cookie.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2026 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. // +----------------------------------------------------------------------
  12. // | ThinkPHP [ WE CAN DO IT JUST THINK ]
  13. // +----------------------------------------------------------------------
  14. // | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
  15. // +----------------------------------------------------------------------
  16. // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  17. // +----------------------------------------------------------------------
  18. // | Author: liu21st <liu21st@gmail.com>
  19. // +----------------------------------------------------------------------
  20. // +----------------------------------------------------------------------
  21. // | Cookie设置
  22. // +----------------------------------------------------------------------
  23. return [
  24. // cookie 保存时间
  25. 'expire' => 0,
  26. // cookie 保存路径
  27. 'path' => '/',
  28. // cookie 有效域名
  29. 'domain' => '',
  30. // cookie 启用安全传输
  31. 'secure' => false,
  32. // httponly设置
  33. 'httponly' => false,
  34. // 是否使用 setcookie
  35. 'setcookie' => true,
  36. // 跨域header
  37. 'header' => [
  38. 'Access-Control-Allow-Origin' => '*',
  39. 'Access-Control-Allow-Headers' => 'Authori-zation,Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-Requested-With, Form-type, Cb-lang, Invalid-zation',
  40. 'Access-Control-Allow-Methods' => 'GET,POST,PATCH,PUT,DELETE,OPTIONS,DELETE',
  41. 'Access-Control-Max-Age' => '1728000',
  42. 'Access-Control-Allow-Credentials' => 'true'
  43. ],
  44. // token名称
  45. 'token_name' => 'Authori-zation',
  46. ];