Cookie"PHPSESSID"将很快被视为针对< file>的跨站点Cookie.因为方案不匹配 [英] Cookie “PHPSESSID” will be soon treated as cross-site cookie against <file> because the scheme does not match

查看:152
本文介绍了Cookie"PHPSESSID"将很快被视为针对< file>的跨站点Cookie.因为方案不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚注意到我的控制台上满是这个警告,出现在每个链接的资源上.这包括所有引用的CSS文件,javascript文件,SVG图像,甚至包括来自ajax调用的URL(以JSON响应).但是没有图像.

I've just noticed my console is littered with this warning, appearing for every single linked resource. This includes all referenced CSS files, javascript files, SVG images, and even URLs from ajax calls (which respond in JSON). But not images.

例如,在 style.css 文件的情况下,警告将显示:

The warning, for example in case of a style.css file, will say:

由于方案不匹配,Cookie"PHPSESSID"将很快被视为针对"http://localhost/style.css"的跨站点Cookie.

Cookie "PHPSESSID" will be soon treated as cross-site cookie against "http://localhost/style.css" because the scheme does not match.

但是,该方案与什么不匹配?文件?因为它确实如此.

But, the scheme doesn't match what? The document? Because that it does.

  • 我的网站的网址是 http://localhost/.
  • 该站点及其资源全部位于 http 上(本地主机上没有 https )
  • 域名绝对没有区别,因为所有内容都相对于域名进行引用(这意味着文件路径以斜杠 href ="/style.css" 开头)
  • The URL of my site is http://localhost/.
  • The site and its resources are all on http (no https on localhost)
  • The domain name is definitely not different because everything is referenced relative to the domain name (meaning the filepaths start with a slash href="/style.css")

网络检查器仅报告绿色的 200 OK 响应,显示一切正常.

The Network inspector just reports a green 200 OK response, showing everything as normal.

只有Mozilla Firefox对此有所抱怨.铬似乎无关紧要.我没有任何浏览器加载项.这些警告似乎来自浏览器,每个警告链接都可以在Debugger中查看相应的文件源.

It's only Mozilla Firefox that is complaining about this. Chromium seems to not be concerned by anything. I don't have any browser add-ons. The warnings seem to originate from the browser, and each warning links to view the corresponding file source in Debugger.

为什么会出现?

推荐答案

与我发生的事情完全相同.问题是,firefox使我什至无法显示托管在相同URL上的不同网站的Cookie:"localhost:Port number";存储在浏览器内存中.

that was exactly same happening with me. the issue was that, firefox keeps me showing even Cookies of different websites hosted on same URL : "localhost:Port number" stored inside browser memory.

对于我来说,我有两个配置为在 http://localhost:62601 上运行的项目,当我运行第一个项目时,它将那个cookie保存在浏览器内存中.当我运行具有相同URL的第二个项目时,该项目控制台中也可以使用Cookie.

In my case, i have two projects configured to run at http://localhost:62601, when i run first project, it saves that cookie in browser memory. when i run second project having same URL, Cookie is available inside that projects console also.

您可以做的是从浏览器中删除所有cookie.

what you can do, is delete the all of the cookies from browser.

这篇关于Cookie"PHPSESSID"将很快被视为针对< file>的跨站点Cookie.因为方案不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆