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.

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

报告相同问题?

悬赏问题

  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序
  • ¥15 onvif+openssl,vs2022编译openssl64
  • ¥15 iOS 自定义输入法-第三方输入法