mirror of
https://github.com/vrana/adminer.git
synced 2025-08-07 23:27:17 +02:00
Move $HTTPS to HTTPS
This commit is contained in:
@@ -323,12 +323,11 @@ function convert_fields(array $columns, array $fields, array $select = array()):
|
||||
* @param int $lifetime number of seconds, 0 for session cookie, 2592000 - 30 days
|
||||
*/
|
||||
function cookie(string $name, ?string $value, int $lifetime = 2592000): void {
|
||||
global $HTTPS;
|
||||
header(
|
||||
"Set-Cookie: $name=" . urlencode($value)
|
||||
. ($lifetime ? "; expires=" . gmdate("D, d M Y H:i:s", time() + $lifetime) . " GMT" : "")
|
||||
. "; path=" . preg_replace('~\?.*~', '', $_SERVER["REQUEST_URI"])
|
||||
. ($HTTPS ? "; secure" : "")
|
||||
. (HTTPS ? "; secure" : "")
|
||||
. "; HttpOnly; SameSite=lax",
|
||||
false
|
||||
);
|
||||
|
Reference in New Issue
Block a user