duanmei1894 2014-01-17 22:31
浏览 416
已采纳

PHP session.cookie_secure实际上并没有将cookie设置为安全

In my php.ini confirmed I have:

session.cookie_secure = 1

Also, doing:

<?php print_r(session_get_cookie_params()); ?>

Results in:

Array ( [lifetime] => 0 [path] => / [domain] => [secure] => 1 [httponly] => 1 )

However, inspecting a page in my application with Chrome Developer tools, going to cookies, it lists that sessions cookie is not secure, and not http only.

enter image description hereenter image description here

  • 写回答

1条回答 默认 最新

  • dongyuqi3808 2014-01-20 18:39
    关注

    Similar to my answer in another question, Chrome developer tools always show blank Secure and HTTP attributes when the cookie is sent in the request. This is because the fact that a cookie is secure or HTTP only is not actually sent in a HTTP request. All that is sent is the name/value pair in the Cookie HTTP request header:

    Cookie: name=value

    Try an extension such as Edit This Cookie which will show whether the cookie has been successfully set as secure and HTTP Only.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!