Skip to content

Commit

Permalink
set SameSite for all cookies
Browse files Browse the repository at this point in the history
  • Loading branch information
SpeckiJ committed Jun 16, 2023
1 parent c5d5365 commit 3f8bbca
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
8 changes: 8 additions & 0 deletions webapp/src/main/webapp/META-INF/context.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<Context>

<!-- Add SameSite to the cookies -->
<CookieProcessor
sameSiteCookies="strict" />

</Context>
10 changes: 8 additions & 2 deletions webapp/src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<session-config>
<cookie-config>
<http-only>true</http-only>
<secure>true</secure>
<comment>__SAME_SITE_STRICT__</comment>
</cookie-config>
</session-config>
<display-name>${project.parent.name}; Git-Branch: '${git.branch}'; Git-Commit: '${git.commit.id}' @ ${git.commit.time}; Build time: ${git.build.time}</display-name>
<description>This is an OGC SOS.</description>
<context-param>
Expand Down

0 comments on commit 3f8bbca

Please sign in to comment.