try with alias in admin

This commit is contained in:
einhornimmond 2025-05-22 07:01:52 +02:00
parent 440001af62
commit f65dd5aba2

View File

@ -133,8 +133,8 @@ server {
location /admin {
limit_req zone=frontend burst=30 nodelay;
limit_conn addr 20;
rewrite ^/admin/(.*)$ /$1 break;
root $PROJECT_ROOT/admin/build/;
#rewrite ^/admin/(.*)$ /$1 break;
alias $PROJECT_ROOT/admin/build/;
index index.html;
# caching rules for assets
@ -142,12 +142,12 @@ server {
location ~* \.(?:woff2?|ttf|otf|eot|jpg|jpeg|png|gif|svg|webp|ico)$ {
# keep assets for a week
add_header Cache-Control "public, max-age=604800";
# try_files $uri =404;
try_files $uri =404;
}
# hashed assets
location ~* \.(?:js|css|json)$ {
add_header Cache-Control "public, max-age=31536000, immutable";
# try_files $uri =404;
try_files $uri =404;
}
try_files $uri $uri/ /index.html = 404;