Bug 29791: KohaOpacLanguage cookie should set the secure flag if using https

To test, the headers should have value set-cookie: secure;
for the language cookie, when the site is using https.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Kyle M Hall 2022-01-04 10:24:18 -05:00 committed by Fridolin Somers
parent 3e484d6593
commit 1f34ec1330
1 changed files with 1 additions and 0 deletions

View File

@ -349,6 +349,7 @@ sub getlanguagecookie {
-value => $language,
-HttpOnly => 1,
-expires => '+3y'
-secure => ( C4::Context->https_enabled() ? 1 : 0 ),
);
return $cookie;