aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/web/WebServer.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/web/WebServer.java')
-rw-r--r--src/main/java/org/traccar/web/WebServer.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/web/WebServer.java b/src/main/java/org/traccar/web/WebServer.java
index 7f0ec53b6..3f2a24815 100644
--- a/src/main/java/org/traccar/web/WebServer.java
+++ b/src/main/java/org/traccar/web/WebServer.java
@@ -167,6 +167,11 @@ public class WebServer {
SecurityRequestFilter.class, CorsResponseFilter.class, DateParameterConverterProvider.class);
resourceConfig.packages(ServerResource.class.getPackage().getName());
servletHandler.addServlet(new ServletHolder(new ServletContainer(resourceConfig)), "/api/*");
+
+ if (config.getBoolean(Keys.WEB_SAME_SITE_COOKIE_NONE)) {
+ servletHandler.getServletContext().getSessionCookieConfig().setSecure(true);
+ servletHandler.getServletContext().getSessionCookieConfig().setComment("__SAME_SITE_NONE__");
+ }
}
public void start() {