This post was updated 745 days ago and some of the ideas may be out of date.
#PROXY-START/
location ^~ /
{
#https://cdn-liang-wangweimin888-top-idvkbqj.qiniudns.com/
proxy_pass http://iovip-cn-east-2.qiniuio.com/;
proxy_set_header Host image.wangweimin888.top;
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_set_header Connection $connection_upgrade;
# proxy_hide_header Upgrade;
add_header X-Cache $upstream_cache_status;
#Set Nginx Cache
set $static_file1phMaTed 0;
if ( $uri ~* "\.(gif|png|jpg|css|js|woff|woff2)$" )
{
set $static_file1phMaTed 1;
expires 12h;
}
if ( $static_file1phMaTed = 0 )
{
add_header Cache-Control no-cache;
}
}
#PROXY-END/















参与讨论