proxy instead of rewrite

This commit is contained in:
mashirozx 2021-10-23 22:59:56 +08:00
parent 241d025459
commit 3d5ff59de0
2 changed files with 14 additions and 7 deletions

View File

@ -112,15 +112,22 @@ server {
ssl_certificate_key ca/pixiv.net.key;
location / {
rewrite ^/(.*)$ https://i.pixiv.re/$1 redirect;
set $pximg_url i.pixiv.re;
#rewrite ^/(.*)$ https://$pximg_url/$1 redirect;
# proxy_pass https://i-pximg-net;
# proxy_set_header Host $http_host;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header X-Real_IP $remote_addr;
# proxy_set_header User-Agent $http_user_agent;
# proxy_set_header Accept-Encoding '';
# proxy_buffering off;
resolver 223.5.5.5;
proxy_pass https://$pximg_url;
proxy_set_header Host $pximg_url;
proxy_ssl_server_name on;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header Accept-Encoding '';
proxy_buffering off;
}
}

View File

@ -1 +1 @@
12424
4624