Skip to content

Instantly share code, notes, and snippets.

@bibarsov
Created December 25, 2019 15:20
Show Gist options
  • Save bibarsov/2c3f5913a317a621d93184058dfadbe6 to your computer and use it in GitHub Desktop.
Save bibarsov/2c3f5913a317a621d93184058dfadbe6 to your computer and use it in GitHub Desktop.
Spring Boot configuration

Changed to LegacyCookieProcessor because default doesn't allow to use [.second-level-domain.top-level-domain] as a domain for cookie

@Bean
public WebServerFactoryCustomizer<TomcatServletWebServerFactory> webServerFactoryCustomizer() {
    return tomcatServletWebServerFactory -> tomcatServletWebServerFactory.addContextCustomizers(
        (TomcatContextCustomizer) context -> context.setCookieProcessor(new LegacyCookieProcessor())
    );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment