
我目前;如果用戶嘗試透過瀏覽器直接存取所有圖像的圖像,則已配置為重定向,但如果圖像位於特定子目錄中,我不希望它們重定向/static/favicon/
location ~* ^/(?<filenum>.*)\.(jpeg|jpg|png|webp)$ {
proxy_pass http://xxx.xxx.xxx.xxx:7492;
valid_referers example.com;
if ($invalid_referer = "1") {
add_header Cache-Control "no-cache";
return 301 https://example.com/$filenum;
}
}
如果圖像位於,我怎麼能不使其重定向/static/favicon/