我有一个在www.example.com
上运行的网站,使GET请求api.example.com
处理表单。当我检查api.example.com
的web服务器日志时,我看到来自Safari的请求得到完整的引用(例如,www.example.com/page-where-request-originated)。但是来自Chrome的请求只能获得部分引用(www.example.com)。
当请求击中api.example.com
时,我需要能够跟踪完整的引用页。查看referer - policy的文档,似乎我唯一的选择是将其设置为unsafe-url
。但这似乎是多余的,因为我只希望referer被发送到example.com
的子域。这可能吗?
我能找到的唯一选项是strict-origin
:Send the origin as referrer, but only when the request is no downgrade from https to http
。
见:https://wiki.crashtest-security.com/enable-security-headers
其余部分要么完全省略引用者,要么不带任何URL参数发送源URL。