ysmintor 大佬有话说 :
nginx 反代替换没效果
想反代 oneindex 的下载地址 xxx-my.sharepoint.com->cdn.aaa.com,在反代配置的地方用了 sub_filter ,但下午的文件链接还是 xxx-my.sharepoint.com 开头,没效果。麻烦大佬看下。
#PROXY-START/
location~* .(php|jsp|cgi|asp|aspx)$
{
proxy_set_header Accept-Encoding "";
proxy_pass https://od.aaaa.com;
proxy_set_header Host od.aaaa.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;
sub_filter "xxx-my.sharepoint.com" "cdn.aaa.com";
sub_filter_once off;
sub_filter_types *;
}
location /
{
proxy_set_header Accept-Encoding "";
proxy_pass https://od.aaa.com;
proxy_set_header Host od2.aaa.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;
sub_filter "xxx-my.sharepoint.com" "cdn.aaaa.com";
sub_filter_once off;
sub_filter_types *;
#Set Nginx Cache
add_header Cache-Control no-cache;
expires 12h;
}
#PROXY-END/
https://cdn.jsdelivr.net/gh/hishis/forum-master/public/images/patch.gif
steven52880 大佬有话说 :
反代oneindex干嘛
反代od就好了啊
ysmintor 大佬有话说 :
steven52880 大佬有话说 : 2020-5-11 17:37
反代oneindex干嘛
反代od就好了啊
反代 oneindex 是国内区域反代,其它区域不反代。
oneindex 不就是 od 吗?
没明白你的意思
https://cdn.jsdelivr.net/gh/hishis/forum-master/public/images/patch.gif
steven52880 大佬有话说 :
ysmintor 大佬有话说 : 2020-5-11 17:46
反代 oneindex 是国内区域反代,其它区域不反代。
oneindex 不就是 od 吗?
没明白你的意思
反代OneDrive的域名,或者套cdn
然后在oneindex里面配置
hanada 大佬有话说 :
肯定没用啊……因为是302跳转的,跳转的Onedrive域名写在header里
sdka 大佬有话说 :
302跳转要用proxy_redirect替换