Skip to content

Commit

Permalink
#110: nginx update
Browse files Browse the repository at this point in the history
  • Loading branch information
SaintAngeLs committed Jan 23, 2024
1 parent 6336aa9 commit 6e1219b
Showing 1 changed file with 4 additions and 19 deletions.
23 changes: 4 additions & 19 deletions SwiftParcel.Web/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,10 @@ http {
try_files $uri $uri/ /SaintAngeLs/courier_app/index.html;
}

location ~ ^/SaintAngeLs/courier_app/static/ {
# Correct the path in try_files to refer to the right fallback
try_files $uri $uri/ /SaintAngeLs/courier_app/index.html;
}

# Separate location blocks for JavaScript and CSS with specific optimizations
location ~* \.(js)$ {
try_files $uri /SaintAngeLs/courier_app/index.html;
expires 1y;
access_log off;
add_header Cache-Control "public";
}

location ~* \.(css)$ {
try_files $uri /SaintAngeLs/courier_app/index.html;
expires 1y;
access_log off;
add_header Cache-Control "public";
}
# location /SaintAngeLs/courier_app/static/ {
# alias /usr/share/nginx/html/static/;
# try_files $uri $uri/ /SaintAngeLs/courier_app/static;
# }

error_page 404 /index.html;
}
Expand Down

0 comments on commit 6e1219b

Please sign in to comment.