forked from tools/josh
Ensure safe cookies
This commit is contained in:
parent
2c4b1c29e5
commit
09ed8f0b47
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "fwdekker.com",
|
||||
"version": "0.33.8",
|
||||
"version": "0.33.9",
|
||||
"description": "The source code of [my personal website](https://fwdekker.com/).",
|
||||
"author": "Felix W. Dekker",
|
||||
"browser": "dist/bundle.js",
|
||||
|
|
|
@ -119,7 +119,7 @@ export class Persistence {
|
|||
* @param environment the environment to persist
|
||||
*/
|
||||
static setEnvironment(environment: Environment): void {
|
||||
Cookies.set("env", environment.variables, {"path": "/"});
|
||||
Cookies.set("env", environment.variables, {path: "/", secure: true, sameSite: "lax"});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -162,8 +162,10 @@ export class Persistence {
|
|||
*/
|
||||
static setPoweroff(value: boolean): void {
|
||||
Cookies.set("poweroff", "" + value, {
|
||||
"expires": new Date(new Date().setSeconds(new Date().getSeconds() + 30)),
|
||||
"path": "/"
|
||||
expires: new Date(new Date().setSeconds(new Date().getSeconds() + 30)),
|
||||
path: "/",
|
||||
secure: true,
|
||||
sameSite: "lax"
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue