html - nginx 反向代理 获取三方图片时的referer问题
大家讲道理
大家讲道理 2017-04-17 13:27:53
0
2
920
大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(2)
迷茫

It has nothing to do with nginx. This request is simply your nginx and you have no control over it.

PHPzhong

Found some answers.
1. Because I am not familiar with HTML, I have found out that it is the proxy webpage, which requested images from a third-party website. The website will verify the referer, but can allow the referer to be empty.
Prohibit the use of referer when requesting, and the problem will be solved.
Referrer Policy Here you can see the introduction of referrer.
Well, referrer can be banned, so we can do the simplest thing, ban referrer globally
2. So here it is

问题就是在nginx取回的reponse中加一个
<meta name="referrer" content="no-referrer">

3. Here
I saw an article about how-to-add-a-response-header-on-nginx-when-using-proxy-pass,

4. So now I just use add_header or more_set_header to add a prohibited referrer.
I am not familiar with HTML, how should I add it?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template