nginx: add /assets location to fit Vite build

This commit is contained in:
maxlath
2025-10-10 16:51:15 +02:00
parent 0e31506126
commit 2d223df234

View File

@@ -128,6 +128,15 @@ server {
} }
} }
location /assets {
root /home/admin/inventaire/client/public;
include /etc/nginx/snippets/security_headers.conf;
gzip_static on;
add_header Access-Control-Allow-Origin "*";
add_header Access-Control-Allow-Methods "GET,HEAD,OPTIONS";
add_header Access-Control-Allow-Headers "content-type";
}
# Pass the request to the node.js server # Pass the request to the node.js server
# with some correct headers for proxy-awareness # with some correct headers for proxy-awareness
location /api { location /api {