Example usage for com.google.common.net HttpHeaders X_POWERED_BY

List of usage examples for com.google.common.net HttpHeaders X_POWERED_BY

Introduction

In this page you can find the example usage for com.google.common.net HttpHeaders X_POWERED_BY.

Prototype

String X_POWERED_BY

To view the source code for com.google.common.net HttpHeaders X_POWERED_BY.

Click Source Link

Document

The HTTP X-Powered-By header field name.

Usage

From source file:org.restheart.handlers.CORSHandler.java

private void injectXPBHeader(HeadersManager headers) {
    headers.addResponseHeader(HttpString.tryFromString(HttpHeaders.X_POWERED_BY), "restheart.org");
}

From source file:org.restheart.handlers.CORSHandler.java

private void injectAccessControlAllowHeaders(HeadersManager headers) {

    if (headers.isRequestHeaderSet(ORIGIN)) {
        headers.addResponseHeader(ACCESS_CONTROL_ALLOW_ORIGIN, headers.getRequestHeader(ORIGIN).getFirst());
    } else {/*from  w  w w  .  j a v  a2 s  .  co m*/
        headers.addResponseHeader(ACCESS_CONTROL_ALLOW_ORIGIN, ALL_ORIGINS);
    }

    headers.addResponseHeader(ACCESS_CONTROL_ALLOW_CREDENTIAL, TRUE);

    headers.addResponseHeader(ACCESS_CONTROL_EXPOSE_HEADERS, LOCATION_STRING);
    headers.addResponseHeader(ACCESS_CONTROL_EXPOSE_HEADERS,
            LOCATION_STRING + ", " + Headers.ETAG + ", " + HttpHeaders.X_POWERED_BY);
}

From source file:org.restheart.security.handlers.CORSHandler.java

private void injectAccessControlAllowHeaders(HeadersManager headers) {

    if (headers.isRequestHeaderSet(ORIGIN)) {
        headers.addResponseHeader(ACCESS_CONTROL_ALLOW_ORIGIN, headers.getRequestHeader(ORIGIN).getFirst());
    } else {//from   ww w .  j a va 2s  . c o m
        headers.addResponseHeader(ACCESS_CONTROL_ALLOW_ORIGIN, ALL_ORIGINS);
    }

    headers.addResponseHeader(ACCESS_CONTROL_ALLOW_CREDENTIAL, TRUE);

    headers.addResponseHeader(ACCESS_CONTROL_EXPOSE_HEADERS, LOCATION_STRING);
    headers.addResponseHeader(ACCESS_CONTROL_EXPOSE_HEADERS,
            LOCATION_STRING + ", " + Headers.ETAG + ", " + AUTH_TOKEN_HEADER.toString() + ", "
                    + AUTH_TOKEN_VALID_HEADER.toString() + ", " + AUTH_TOKEN_LOCATION_HEADER.toString() + ", "
                    + HttpHeaders.X_POWERED_BY);
}