本文介绍了从 https 页面转到 http 页面时是否发送 HTTP 标头 Referer?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

经过几次测试后,我开始得出结论,当从 https 页面单击 http 页面时,浏览器不会发送 Referer HTTP 标头.

After a few tests, I'm starting to reach the conclusion that a browser does not send a Referer HTTP header when one clicks to a http page from a https one.

这是出于什么安全原因?是否在标准中的某处进行了定义?

What security reason is that for? Is is defined somewhere in the standard?

推荐答案

HTTP RFC 部分声明,在 15.1.3 在 URI 中编码敏感信息 :

客户不应该包括推荐人(非安全)HTTP 中的标头字段请求如果引用页面是使用安全协议传输.

所以,这是预期/标准行为.

So, this is expected / standard behaviour.

这篇关于从 https 页面转到 http 页面时是否发送 HTTP 标头 Referer?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-30 16:51