hazelcast/hazelcast-wm

How to set cookie Max-Age and path using WebFilter

mdogan opened this issue · 0 comments

Moved from hazelcast/hazelcast#2626


I need cookie Max-Age and path not default.

Looking at the code, cannot find any getParam. (WebFilter.java line.183)

private void initCookieParams() {
    String cookieName = getParam("cookie-name");
    if (cookieName != null) {
        sessionCookieName = cookieName;
    }
    String cookieDomain = getParam("cookie-domain");
    if (cookieDomain != null) {
        sessionCookieDomain = cookieDomain;
    }
    String cookieSecure = getParam("cookie-secure");
    if (cookieSecure != null) {
        sessionCookieSecure = Boolean.valueOf(cookieSecure);
    }
    String cookieHttpOnly = getParam("cookie-http-only");
    if (cookieHttpOnly != null) {
        sessionCookieHttpOnly = Boolean.valueOf(cookieHttpOnly);
    }
}

still more hard coding Max-Age (WebFilter.java line.330)

sessionCookie.setMaxAge(-1);