Files
mayi-grade/config/cookie.php
T

25 lines
820 B
PHP
Executable File

<?php
// +----------------------------------------------------------------------
// | Cookie设置
// +----------------------------------------------------------------------
use think\facade\Env;
return [
// cookie 保存时间
'expire' => 7200,
// cookie 保存路径
'path' => '/',
// cookie 有效域名
'domain' => '',
// cookie 启用安全传输
// Production defaults to HTTPS-only. Local debug mode stays usable over
// HTTP unless COOKIE_SECURE explicitly overrides the setting.
'secure' => Env::get('cookie.secure', !Env::get('app.debug', false)),
// httponly设置
'httponly' => true,
// Prevent cross-site form posts from carrying the session by default.
'samesite' => 'lax',
// 是否使用 setcookie
'setcookie' => true,
];