cookie.php 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | Cookie设置
  4. // +----------------------------------------------------------------------
  5. return [
  6. // cookie 保存时间
  7. 'expire' => 0,
  8. // cookie 保存路径
  9. 'path' => '/',
  10. // cookie 有效域名
  11. 'domain' => '',
  12. // cookie 启用安全传输
  13. 'secure' => false,
  14. // httponly设置
  15. 'httponly' => false,
  16. // 是否使用 setcookie
  17. 'setcookie' => true,
  18. // samesite 设置,支持 'strict' 'lax'
  19. 'samesite' => '',
  20. 'header' => [
  21. 'Access-Control-Allow-Origin' => '*',
  22. 'Access-Control-Allow-Headers' => 'Client-Userid,Authori-zation,Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-Requested-With, Form-type',
  23. 'Access-Control-Allow-Methods' => 'GET,POST,PATCH,PUT,DELETE,OPTIONS,DELETE',
  24. 'Access-Control-Max-Age' => '1728000',
  25. 'Access-Control-Allow-Credentials' => 'true',
  26. 'Access-Control-Expose-Headers' => 'Server'
  27. ],
  28. // token名称
  29. 'token_name' => 'Authori-zation',
  30. ];