From a76f6a5931782adbae717678f8f92569ed0d5bcb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Mon, 13 Sep 2021 12:48:33 +0200 Subject: [PATCH] allow suppression of default session cookie --- session.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/session.sh b/session.sh index ca931fa..5b36ae0 100755 --- a/session.sh +++ b/session.sh @@ -114,6 +114,11 @@ SESSION_VAR() { fi } +SESSION_COOKIE() { + SET_COOKIE 0 session="$SESSION_KEY" Path=/ SameSite=Strict HttpOnly +} + SESSION_KEY="$(update_session)" -SET_COOKIE 0 session="$SESSION_KEY" Path=/ SameSite=Strict HttpOnly SESSION_ID="${SESSION_KEY%% *}" + +[ "$1" = nocookie ] || SESSION_COOKIE -- 2.39.2