mirror of
https://gitlab.kit.edu/uskyk/typicalc.git
synced 2024-11-15 13:43:10 +00:00
25 lines
899 B
Java
25 lines
899 B
Java
package edu.kit.typicalc;
|
|
|
|
import org.apache.tomcat.util.http.Rfc6265CookieProcessor;
|
|
import org.apache.tomcat.util.http.SameSiteCookies;
|
|
import org.springframework.boot.web.embedded.tomcat.TomcatContextCustomizer;
|
|
import org.springframework.context.annotation.Bean;
|
|
import org.springframework.context.annotation.Configuration;
|
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|
|
|
/**
|
|
* This class configures some server properties related to HTTP.
|
|
*/
|
|
@Configuration
|
|
public class TypicalcConfiguration implements WebMvcConfigurer {
|
|
@Bean
|
|
public TomcatContextCustomizer sameSiteCookiesConfig() {
|
|
return context -> {
|
|
Rfc6265CookieProcessor cookieProcessor = new Rfc6265CookieProcessor();
|
|
cookieProcessor.setSameSiteCookies(SameSiteCookies.STRICT.getValue());
|
|
context.setCookieProcessor(cookieProcessor);
|
|
};
|
|
}
|
|
}
|
|
|