cookie.php 497 B

1234567891011121314151617181920
  1. <?php
  2. return [
  3. // cookie 保存时间
  4. 'expire' => 0,
  5. // cookie 保存路径
  6. 'path' => '/',
  7. // cookie 有效域名
  8. 'domain' => '',
  9. // httponly 访问设置
  10. 'httponly' => true,
  11. // 是否使用 setcookie
  12. 'setcookie' => true,
  13. // cookie 安全传输,只支持 https 协议
  14. 'secure' => app()->request->isSsl(),
  15. // samesite 安全设置,支持 'strict' 'lax' 'none'
  16. 'samesite' => app()->request->isSsl() ? 'none' : 'lax',
  17. ];