We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The path of the cookie is changed. More sessions will be created for the same user
old code: protected Cookie createProxyCookie(HttpServletRequest servletRequest, HttpCookie cookie) { String proxyCookieName = getProxyCookieName(cookie); Cookie servletCookie = new Cookie(proxyCookieName, cookie.getValue()); servletCookie.setPath(buildProxyCookiePath(servletRequest)); //set to the path of the proxy servlet servletCookie.setComment(cookie.getComment()); servletCookie.setMaxAge((int) cookie.getMaxAge()); // don't set cookie domain servletCookie.setSecure(cookie.getSecure()); servletCookie.setVersion(cookie.getVersion()); servletCookie.setHttpOnly(cookie.isHttpOnly()); return servletCookie; }
protected String buildProxyCookiePath(HttpServletRequest servletRequest) { String path = servletRequest.getContextPath(); // path starts with / or is empty string path += servletRequest.getServletPath(); // servlet path starts with / or is empty string if (path.isEmpty()) { path = "/"; } return path; }
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
The path of the cookie is changed. More sessions will be created for the same user
old code:
protected Cookie createProxyCookie(HttpServletRequest servletRequest, HttpCookie cookie) {
String proxyCookieName = getProxyCookieName(cookie);
Cookie servletCookie = new Cookie(proxyCookieName, cookie.getValue());
servletCookie.setPath(buildProxyCookiePath(servletRequest)); //set to the path of the proxy servlet
servletCookie.setComment(cookie.getComment());
servletCookie.setMaxAge((int) cookie.getMaxAge());
// don't set cookie domain
servletCookie.setSecure(cookie.getSecure());
servletCookie.setVersion(cookie.getVersion());
servletCookie.setHttpOnly(cookie.isHttpOnly());
return servletCookie;
}
protected String buildProxyCookiePath(HttpServletRequest servletRequest) {
String path = servletRequest.getContextPath(); // path starts with / or is empty string
path += servletRequest.getServletPath(); // servlet path starts with / or is empty string
if (path.isEmpty()) {
path = "/";
}
return path;
}
The text was updated successfully, but these errors were encountered: