| 名称 | Referer |
|---|---|
| 作用 | 来源页 URL;防盗链/统计/风控 |
| 规范 | RFC 9110 §10.1.3 |
| 控制 | 页面用 Referrer-Policy 决定发送粒度;HTTPS→HTTP 默认不发送 |
Nginx 简单防盗链
Nginx 简单防盗链
location ~* \.(jpg|png|mp4)$ {
valid_referers none blocked server_names *.example.com;
if ($invalid_referer) { return 403; }
}URL 中的敏感参数会随 Referer 泄漏给第三方域;跨域场景应设置 Referrer-Policy: strict-origin-when-cross-origin(现代浏览器默认)或更严格。