mirror of
https://github.com/spacebarchat/server.git
synced 2026-04-25 16:12:09 +00:00
CORS: change max age from 5s to 60s
This commit is contained in:
@@ -25,7 +25,7 @@ export function CORS(req: Request, res: Response, next: NextFunction) {
|
||||
res.set("Access-Control-Allow-Headers", req.header("Access-Control-Request-Headers") || "*");
|
||||
res.set("Access-Control-Allow-Methods", req.header("Access-Control-Request-Method") || "*");
|
||||
res.set("Access-Control-Allow-Origin", req.header("Origin") ?? "*");
|
||||
res.set("Access-Control-Max-Age", "5"); // dont make it too long so we can change it dynamically
|
||||
res.set("Access-Control-Max-Age", "60"); // dont make it too long so we can change it dynamically
|
||||
// TODO: use better CSP
|
||||
res.set(
|
||||
"Content-security-policy",
|
||||
|
||||
Reference in New Issue
Block a user