Example usage for org.springframework.web.cors CorsConfiguration addExposedHeader

List of usage examples for org.springframework.web.cors CorsConfiguration addExposedHeader

Introduction

In this page you can find the example usage for org.springframework.web.cors CorsConfiguration addExposedHeader.

Prototype

public void addExposedHeader(String exposedHeader) 

Source Link

Document

Add a response header to expose.

Usage

From source file:ca.uhn.fhir.rest.server.interceptor.CorsInterceptor.java

private static CorsConfiguration createDefaultCorsConfig() {
    CorsConfiguration retVal = new CorsConfiguration();

    // *********************************************************
    // Update constructor documentation if you change these:
    // *********************************************************

    retVal.addAllowedHeader("Origin");
    retVal.addAllowedHeader("Accept");
    retVal.addAllowedHeader("X-Requested-With");
    retVal.addAllowedHeader("Content-Type");
    retVal.addAllowedHeader("Access-Control-Request-Method");
    retVal.addAllowedHeader("Access-Control-Request-Headers");
    retVal.addAllowedOrigin("*");
    retVal.addExposedHeader("Location");
    retVal.addExposedHeader("Content-Location");

    return retVal;
}