[Scummvm-git-logs] scummvm-web master -> 76e18a6ffda3e6a4cd8ee13e248e339dcb85a7f6
Mataniko
mataniko at gmail.com
Fri Sep 25 16:17:49 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm-web' repo located at https://github.com/scummvm/scummvm-web .
Summary:
76e18a6ffd WEB: Update language cookie
Commit: 76e18a6ffda3e6a4cd8ee13e248e339dcb85a7f6
https://github.com/scummvm/scummvm-web/commit/76e18a6ffda3e6a4cd8ee13e248e339dcb85a7f6
Author: Mataniko (mataniko at gmail.com)
Date: 2020-09-25T12:17:41-04:00
Commit Message:
WEB: Update language cookie
Changed paths:
public_html/index.php
diff --git a/public_html/index.php b/public_html/index.php
index 121d9811..0e05db7a 100644
--- a/public_html/index.php
+++ b/public_html/index.php
@@ -21,7 +21,15 @@ foreach ($languages as $lang) {
if (!empty($_GET['lang'])) {
$lang = $_GET['lang'];
- setcookie("lang", $lang, time()+86400, "/");
+ $cookie_options = array (
+ 'expires' => time()+86400,
+ 'path' => '/',
+ 'domain' => '.scummvm.org', // leading dot for compatibility or use subdomain
+ 'secure' => true, // or false
+ 'httponly' => true, // or false
+ 'samesite' => 'None' // None || Lax || Strict
+ );
+ setcookie("lang", $lang, $cookie_options);
} elseif (!empty($_COOKIE['lang'])) {
$lang = $_COOKIE['lang'];
} elseif (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
More information about the Scummvm-git-logs
mailing list