Internet Explorer / MS Edge set-cookie适用于127.0.0.1,但不适用于localhost

时间:2015-07-31 16:27:24

标签: internet-explorer session cookies session-cookies

使用Chrome或Firefox,set-cookie可以同时适用于localhost和127.0.0.1。但是,IE和MS Edge都忽略localhost的set-cookie,但接受127.0.0.1 cookie。

作品:http://127.0.0.1

Set-Cookie: user_auth=16c66667dd3a04018d7c59d30eb5bfd928031e5cc67d889a2332d85b0f4c2e8b68bdc1a2cc2e5590e40a9c606827b20af72219f562d3a1d747b272fed9876eb1fb0808b99c9eab71430ee408a36ec810f2182819a5ce09972866f18f2b1f03a3b42fe585cdd837dc122e23bb90ecf8ac94471fc5097a7fb28b83c615149a9aca; Max-Age=31536000; Expires=Sat, 30 Jul 2016 16:14:26 GMT; Path=/; Domain=127.0.0.1; HTTPOnly

不起作用:http://localhost

Set-Cookie: user_auth=cdbdfa9bedf0536d7db57593779ead321e949216dedba5c79d124b56860c0779a4d9942dc4da9aa51da59d186624fae6932fcd891da927f7ffff283b86660ac1dd6666066ff269393c47ec301011557ccd90a797336b4ccc8c508c55c9d17332f033cdd84e564072b73366ed764a0346ea044815a0f112e9d169939831e69a25; Max-Age=31536000; Expires=Sat, 30 Jul 2016 16:20:48 GMT; Path=/; Domain=localhost; HTTPOnly

两者都有P3P策略集,即使它不需要:

P3P: CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"

在此先感谢,我完全陷入困境。

0 个答案:

没有答案