简体   繁体   English

我可以在浏览器中查看 httpOnly cookies

[英]I can view httpOnly cookies in browser

I thought that httpOnly cookies were only available to read in a http request.我认为 httpOnly cookies 只能在 http 请求中读取。 However, when I open up Firefox dev tools, I can see the cookies' value.但是,当我打开 Firefox 开发工具时,我可以看到 cookie 的值。 Is this normal?这是正常的吗?

Yes, that's normal.是的,这很正常。 What HttpOnly does is it prevents cookies from being accessible to JavaScript , which makes impossible to tamper with programatically (on the client). HttpOnly 的作用是防止 cookies 被JavaScript访问,这使得无法以编程方式(在客户端)篡改。 You can still access it manually through the browser's devtools.您仍然可以通过浏览器的 devtools 手动访问它。 (If you weren't, it'd be quite difficult to debug issues with them, after all.) (毕竟,如果您不是,那么很难用它们来调试问题。)

Yes, that's normal.you can access the cookies using the devtool.是的,这很正常。您可以使用开发工具访问 cookies。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM