Setting SameSite Cookie Header in Apache Tomcat 8.5
The SameSite cookie flag is used to limit cookie transitions when a request originates from a third-party origin. Modern browsers set the default SameSite value to "Lax" when it is not declared by the server. To set SameSite Cookie Header in Apache Tomcat, follow these steps:
1.
Open
<Tomcat install directory>\conf\context.xml
in a text editor.
2.
Add the following within the Context tags.
<CookieProcessor sameSiteCookies="strict" />
3.
Save
context.xml.