gpt4 book ai didi

http - 如何在 HTTP Referrer 中不包含 URL 查询字符串

转载 作者:行者123 更新时间:2023-12-05 06:42:19 25 4
gpt4 key购买 nike

确保查询字符串不会作为 HTTP Referrer 数据的一部分包含在内的最佳方法是什么?

我注意到一些潜在的敏感信息(例如 UTM 字段,实际上并不需要 SSL)否则可能会泄露。

目标是针对原始 URL,例如:

http://mywebsite.com/mypage/?myvar=xxx

仅作为引荐来源网址传递:

http://mywebsite.com/mypage/

我已经阅读了 referrer policy元指令( <meta name="referrer" content="origin"> ), 但 it doesn't seem to be widely implemented .

最佳答案

我会说你应该使用 noreferrer指令,可以在单独的链接( <a rel="noreferrer"> )中,也可以像您所说的那样设置引荐来源政策。

但还有其他解决方案,即 hack:像这样:

Another referrer hiding method is to convert the original link URL to a Data URI scheme-based URL containing small HTML page with a meta refresh to the original URL. When the user is redirected from the data: page, the original referrer is hidden. The first public implementation of this method is the Darefer app for ownCloud

引用自:https://en.wikipedia.org/wiki/HTTP_referer#Referer_hiding

附言。这完全是为了完全隐藏引荐来源 header ,而不仅仅是删除查询字符串。

关于http - 如何在 HTTP Referrer 中不包含 URL 查询字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37344253/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com