Skip to content

Commit

Permalink
No longer make the httpOnly attribute of the session cookie configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
AxelRieben committed Oct 24, 2024
1 parent e246da6 commit d941f59
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
8 changes: 0 additions & 8 deletions src/main/java/org/traccar/config/Keys.java
Original file line number Diff line number Diff line change
Expand Up @@ -843,14 +843,6 @@ private Keys() {
List.of(KeyType.CONFIG),
"max-age=3600,public");

/**
* Set HttpOnly attribut to the session cookie.
*/
public static final ConfigKey<Boolean> WEB_COOKIE_HTTP_ONLY = new BooleanConfigKey(
"web.cookieHttpOnly",
List.of(KeyType.CONFIG),
false);

/**
* Enable TOTP authentication on the server.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/traccar/web/WebServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ private void initSessionConfig(ServletContextHandler servletHandler) {
}
}

sessionCookieConfig.setHttpOnly(config.getBoolean(Keys.WEB_COOKIE_HTTP_ONLY));
sessionCookieConfig.setHttpOnly(true);
}

@Override
Expand Down

0 comments on commit d941f59

Please sign in to comment.