网站首页 美食营养 游戏数码 手工爱好 生活家居 健康养生 运动户外 职场理财 情感交际 母婴教育 时尚美容

如何将cookie中httponly属性设置为true

时间:2024-10-12 20:41:05

1、首先打开IIS

如何将cookie中httponly属性设置为true

2、找到需要设置的站点,然后点击网站主页功能中“配置编辑器”

如何将cookie中httponly属性设置为true

3、进入配置编辑器界面,点击“节”的下拉按钮,

如何将cookie中httponly属性设置为true

4、然后依次点击system.web---HTTPCookie

如何将cookie中httponly属性设置为true

5、可以看到httpOnlyCookie的属性值是False,将False双击或按右侧下拉按钮修改为True,点击右上角“应用”保存

如何将cookie中httponly属性设置为true

6、到网站目录中可以看到生成一个文件web.config,有这么一段代码,即设置完成了<?xml vers足毂忍珩ion="1.0" encoding="UTF-8"?><configuration> <system.web> <httpCookies httpOnlyCookies="true" /> </system.web></configuration>

如何将cookie中httponly属性设置为true
© 2025 小知经验
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com