mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-02 16:56:39 +00:00
allow controlling cors from config and add cors middleware to traefik
This commit is contained in:
@@ -120,7 +120,8 @@ export async function login(
|
||||
|
||||
const token = generateSessionToken();
|
||||
await createSession(token, existingUser.userId);
|
||||
const cookie = serializeSessionCookie(token);
|
||||
const isSecure = req.protocol === "https";
|
||||
const cookie = serializeSessionCookie(token, isSecure);
|
||||
|
||||
res.appendHeader("Set-Cookie", cookie);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user