clean up stats cookie handling

This commit is contained in:
MiniDigger | Martin 2022-07-30 13:23:10 +02:00
parent 451056ce1e
commit 809b2e23c4
3 changed files with 5 additions and 3 deletions

View File

@ -44,7 +44,9 @@ function request<T>(url: string, method: AxiosRequestConfig["method"], data: obj
if (statString) {
const parsedCookies = new Cookies(statString);
const statCookie = parsedCookies.get("hangar_stats");
cookies.set("hangar_stats", statCookie); // TODO verify that this all works
// keep cookie settings in sync with StatService#setCookie
cookies.set("hangar_stats", statCookie, { path: "/", sameSite: "strict", maxAge: 60 * 60 * 24 * 356.24 * 1000 });
authLog("got stats cookie from backend", statCookie);
}
}
resolve(data);

@ -1 +1 @@
Subproject commit 2f764c6fe55f50598b256073a6b0142c73afcf66
Subproject commit 4449110e6c7a5fd7d98f11c9f6e56031662cb098

View File

@ -16,7 +16,7 @@ public class RequestUtil {
if (header == null) {
return request.getRemoteAddr();
} else {
return header; // header.split(',').headOption.map(_.trim).getOrElse(request.remoteAddress) ?
return header;
}
}