Files
waf-platform/EdgeUser/web/docs/cdn/referers.md

22 lines
1.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 防盗链
GoEdge提供了简单的防盗链功能可以根据请求来源`Referer`)来决定是否拦截。
## 启用防盗链
在网站设置中 -- "防盗链" 中可以启用防盗链功能:
![referers1.png](referers1.png)
其中:
* `允许直接访问网站` - 允许用户直接访问网站用户第一次访问网站时来源域名通常为空注意在某些浏览器上比如Chrome从HTTPS网站跳转到HTTP网站时可能不会携带来源域名信息
* `来源域名允许一致` - 允许来源域名和当前访问的域名一致,相当于在站内访问
* `允许的来源域名` - 允许的其他来源域名列表
* `禁止的来源域名` - 禁止的来源域名列表;如果一个来源域名既在允许的来源域名中,又在禁止的来源域名中,那么最终将会被禁止
被防盗链阻止后页面将会提示403类似于
~~~
403 Forbidden
The referer has been blocked.
Request ID: 1673496051116481000001.
~~~
如果是中文编码优先的浏览器,将会以中文进行提示。