We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 238db3e commit ad616cbCopy full SHA for ad616cb
1 file changed
admin_download.php
@@ -1,10 +1,15 @@
1
<?php
2
declare(strict_types=1);
3
4
+$isHttps =
5
+ (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off')
6
+ || (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443)
7
+ || (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) === 'https');
8
+
9
session_name('DropzoneAdminSession');
10
session_start([
11
'cookie_httponly' => true,
- 'cookie_secure' => isset($_SERVER['HTTPS']),
12
+ 'cookie_secure' => $isHttps,
13
'cookie_samesite' => 'Lax',
14
]);
15
0 commit comments