mirror of
https://github.com/HangarMC/Hangar.git
synced 2025-01-30 14:30:08 +08:00
clean up stats cookie handling
This commit is contained in:
parent
451056ce1e
commit
809b2e23c4
@ -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
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user