雅安产品
雅安新闻动态 当前位置:首页>雅安>新闻动态>新闻动态

HTTP Referer是header的一部分

网址:www.75ix.com  2026-10-25  作者:admin    阅读:

HTTP Referer是header的一部分,当浏览器向web服务器发送请求时,一般会带上Referer信息告诉服务器是从哪个页面链接过来的,服务器籍此可以获得一些信息用于处
HTTP Referer is a part of the header. When a browser sends a request to a web server, it usually includes Referer information to tell the server which page it is linked from. The server can use this information to process the request
理。可以通过检查请求的来源来防御CSRF攻击。正常请求的referer具有一定规律,如在提交表单的referer必定是在该页面发起的请求。所以通过检查http包头referer的值
Reason. CSRF attacks can be defended by checking the source of the request. The referer for normal requests has a certain pattern, such as when submitting a form, the referer must have initiated the request on that page. So by checking the value of the HTTP header referer
是不是这个页面,来判断是不是CSRF攻击。但在某些情况下如从https跳转到http,浏览器处于安全考虑,不会发送referer,服务器就无法进行check了。若与该网站同域的
Is this the page to determine if it is a CSRF attack. But in some cases, such as when jumping from HTTPS to HTTP, the browser, for security reasons, will not send a referee, and the server cannot perform a check. If it is in the same domain as the website
其他网站有XSS漏洞,那么攻击者可以在其他网站注入恶意脚本,受害者进入了此类同域的网址,也会遭受攻击。出于以上原因,无法完全依赖Referer Check作为防御CSRF
If other websites have XSS vulnerabilities, attackers can inject malicious scripts into other websites, and victims who enter such same domain URLs will also be attacked. Due to the above reasons, it is not possible to fully rely on Referer Check as a defense against CSRF
的主要手段。但是可以通过Referer Check来监控CSRF攻击的发生。
The main means. But the occurrence of CSRF attacks can be monitored through Referer Check.

返回新闻

热线电话
13313028229