pid /tmp/nginx.pid; events { worker_connections 1024; } http { server { listen 7860; server_name localhost; location ~ .*\.(json)?$ { proxy_pass https://yande.re; proxy_set_header Host yande.re; proxy_set_header Referer "https://yande.re"; 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; #Persistent connection related configuration add_header X-Cache $upstream_cache_status; #Set Nginx Cache proxy_set_header Accept-Encoding ""; sub_filter_types *; #test sub_filter "https://files.yande.re/" "http://rogerxavier-pixiv.hf.space/files/"; sub_filter "https://assets.yande.re/" "http://rogerxavier-pixiv.hf.space/assets/"; #test sub_filter_once off; } location /{ proxy_pass https://yande.re; proxy_set_header Host yande.re; 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; #Persistent connection related configuration add_header X-Cache $upstream_cache_status; #Set Nginx Cache } location /files{ proxy_pass https://files.yande.re/; proxy_set_header Host files.yande.re; proxy_set_header Referer "https://yande.re"; 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; #Persistent connection related configuration add_header X-Cache $upstream_cache_status; #Set Nginx Cache } location /assets{ proxy_pass https://assets.yande.re/; proxy_set_header Host assets.yande.re; proxy_set_header Referer "https://yande.re"; 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; #Persistent connection related configuration add_header X-Cache $upstream_cache_status; #Set Nginx Cache } } }