Set cookies to all subdomains

This commit is contained in:
Mikołaj Pich 2019-10-31 16:01:42 +01:00
parent 7104d5ef7b
commit cf27fa9d3e
No known key found for this signature in database
GPG key ID: F62B26E36D4C4BAA

6
app.js
View file

@ -44,9 +44,9 @@ app.use((req, res, next) => {
res.locals.proto = protocol(req);
res.locals.host = req.get('host').replace(/(api|cufs|uonetplus|uonetplus-opiekun|uonetplus-uzytkownik)\./, "");
res.cookie("UonetPlus_ASP.NET_SessionId", "");
res.cookie("ARR_DS_ARR301302", "");
res.cookie("ARR_" + req.get('host'), "1234567891012131314151617181920212223242526272829303132333435363");
res.cookie("UonetPlus_ASP.NET_SessionId", "", { httpOnly: true, domain: req.get("host") });
res.cookie("ARR_DS_ARR301302", "", { httpOnly: true, domain: req.get("host") });
res.cookie("ARR_" + req.get('host'), "1234567891012131314151617181920212223242526272829303132333435363", { httpOnly: true, domain: req.get("host") });
next();
});