nginx / nginx.conf
shed219's picture
Update nginx.conf
5ef59bd
server {
listen 7860 default_server;
server_name _;
rewrite ^/hw(.*) https://shed219-nginx.hf.space/ulhw$1 permanent;
location / {
proxy_pass https://cloudphoneh5.buy.139.com/;
proxy_set_header referer https://cloudphoneh5.buy.139.com/;
proxy_set_header Origin https://cloudphoneh5.buy.139.com;
proxy_set_header :authority: cloudphoneh5.buy.139.com;
add_header X-Frame-Options SAMEORIGIN always;
proxy_set_header Host cloudphoneh5.buy.139.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;
proxy_set_header Upgrade $http_upgrade;
proxy_http_version 1.1;
# proxy_hide_header Upgrade;
add_header X-Cache $upstream_cache_status;
#Set Nginx Cache
proxy_set_header Accept-Encoding "";
sub_filter "/hw/cloudphone/" "/ulhw/cloudphone/";
sub_filter_once off;
set $static_fileA5bezwgr 0;
if ( $uri ~* "\.(gif|png|jpg|css|js|woff|woff2)$" )
{
set $static_fileA5bezwgr 1;
expires 1m;
}
if ( $static_fileA5bezwgr = 0 )
{
add_header Cache-Control no-cache;
}
}
}