fix: 用户头像加载失败的情况

This commit is contained in:
kuaifan 2025-07-22 19:59:05 +08:00
parent facc2fab24
commit 6de4865052

View File

@ -35,7 +35,7 @@ server {
add_header Access-Control-Expose-Headers "Date, Last-Modified, Age" always;
location / {
if ($uri ~* \.(jpe?g|png|gif|webp|svg|ico|bmp)$) {
if ($uri ~* ^/uploads/.*\.(jpe?g|png|gif|webp)$) {
add_header Access-Control-Allow-Origin "http://localhost:2222" always;
add_header Access-Control-Allow-Methods "GET, OPTIONS" always;
add_header Access-Control-Allow-Headers "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization" always;