对于某些业务,如果 Referer 是某个域的原始来源,我们必须检查请求 header 。
但是我们发现Android浏览器的video请求头中没有Referer。
GET foo/bar/biz.mp4
HTTP/1.0
MAX-UDP-PORT: 65535
MTK-RTSP-CACHE-SIZE: 4
User-Agent: stagefright/1.2 (Linux;Android 5.1)
MTK-HTTP-CACHE-SIZE: 10
allow-cross-domain-redirect: false
MIN-UDP-PORT: 1024
Host: example.com
Connection: Keep-Alive
Accept-Encoding: gzip
如何使 header 包含Referer?
最佳答案
添加到 <head>
你的页面
<meta name="referrer" content="always">
http://smerity.com/articles/2013/where_did_all_the_http_referrers_go.html
关于android - Android 浏览器 <video> 标签请求的请求 header 中没有 Referer,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40335856/