反向代理的问题,打开是空白页面

请问,全站反代,打开是空白页面。
检查发现,是目标站的源代码里面引用了其他域名的资源。

该怎样做才能成功?我的配置文件:

location /
{
    expires 12h;
    if ($request_uri ~* "(php|jsp|cgi|asp|aspx)")
    {
         expires 0;
    }
    proxy_pass https://www.123.com;
    proxy_set_header Host www.123.com;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header REMOTE-HOST $remote_addr;

    add_header X-Cache $upstream_cache_status;
    
    proxy_set_header Accept-Encoding "";
    
    sub_filter_once off;
    
    proxy_cache cache_one;
    proxy_cache_key $host$uri$is_args$args;
    proxy_cache_valid 200 304 301 302 12h;
}
阅读 4.7k
1 个回答

这个你要看其它资源是如何引用的,
注意,现在不能跨协议应用资源的。

推荐问题