Example usage for io.vertx.core.http HttpHeaders REFERER

List of usage examples for io.vertx.core.http HttpHeaders REFERER

Introduction

In this page you can find the example usage for io.vertx.core.http HttpHeaders REFERER.

Prototype

CharSequence REFERER

To view the source code for io.vertx.core.http HttpHeaders REFERER.

Click Source Link

Document

Referer header name

Usage

From source file:com.thesoftwarefactory.vertx.web.more.impl.WebContextImpl.java

License:Apache License

@Override
public String referer() {
    if (referer == null) {
        referer = routingContext.request().getHeader(HttpHeaders.REFERER.toString());

        if (referer == null) {
            // Some browsers do not send the referer, in that case let's use
            // "/" as a fallback referer
            referer = "/";
        }/*  w w w .jav a  2s.c o  m*/
    }
    return referer;
}