Codota Logo
CorsRegistration.exposedHeaders
Code IndexAdd Codota to your IDE (free)

How to use
exposedHeaders
method
in
org.springframework.web.reactive.config.CorsRegistration

Best Java code snippets using org.springframework.web.reactive.config.CorsRegistration.exposedHeaders (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
origin: spring-projects/spring-framework

@Test
public void customizedMapping() {
  this.registry.addMapping("/foo").allowedOrigins("http://domain2.com", "http://domain2.com")
      .allowedMethods("DELETE").allowCredentials(false).allowedHeaders("header1", "header2")
      .exposedHeaders("header3", "header4").maxAge(3600);
  Map<String, CorsConfiguration> configs = this.registry.getCorsConfigurations();
  assertEquals(1, configs.size());
  CorsConfiguration config = configs.get("/foo");
  assertEquals(Arrays.asList("http://domain2.com", "http://domain2.com"), config.getAllowedOrigins());
  assertEquals(Arrays.asList("DELETE"), config.getAllowedMethods());
  assertEquals(Arrays.asList("header1", "header2"), config.getAllowedHeaders());
  assertEquals(Arrays.asList("header3", "header4"), config.getExposedHeaders());
  assertEquals(false, config.getAllowCredentials());
  assertEquals(Long.valueOf(3600), config.getMaxAge());
}
origin: forcelate/forcelate-skeletons

  @Override
  public void addCorsMappings(CorsRegistry registry) {
    Cors cors = applicationProperties.getAppConfigs().getCors();
    if (cors.getEnabled()) {
      LOGGER.info("Spring MVC configuration: CORS mappings enabled");
      registry.addMapping(cors.getPathPattern())
          .allowedOrigins(cors.getAllowedOrigins())
          .allowedMethods(cors.getAllowedMethods())
          .exposedHeaders(cors.getExposedHeaders())
          .allowCredentials(cors.getAllowCredentials());
    } else {
      LOGGER.info("Spring MVC configuration: CORS mappings disabled");
    }
  }
};
org.springframework.web.reactive.configCorsRegistrationexposedHeaders

Javadoc

Set the list of response headers other than "simple" headers, i.e. Cache-Control, Content-Language, Content-Type, Expires, Last-Modified, or Pragma, that an actual response might have and can be exposed.

Note that "*" is not supported on this property.

By default this is not set.

Popular methods of CorsRegistration

  • allowedMethods
    Set the HTTP methods to allow, e.g. "GET", "POST", etc.The special value "*" allows all methods. By
  • allowedOrigins
    Set the origins to allow, e.g. "http://domain1.com".The special value "*" allows all domains. By de
  • allowedHeaders
    Set the list of headers that a pre-flight request can list as allowed for use during an actual reque
  • <init>
    Create a new CorsRegistration that allows all origins, headers, and credentials for GET, HEAD, and P
  • allowCredentials
    Whether user credentials are supported.By default this is set to true in which case user credentials
  • getCorsConfiguration
  • getPathPattern
  • maxAge
    Configure how long in seconds the response from a pre-flight request can be cached by clients.By def

Popular in Java

  • Making http requests using okhttp
  • addToBackStack (FragmentTransaction)
  • getSharedPreferences (Context)
  • onRequestPermissionsResult (Fragment)
  • FileInputStream (java.io)
    A FileInputStream obtains input bytes from a file in a file system. What files are available depends
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now