From 2d223df2347a190941e12e516e10a25413a1fb4a Mon Sep 17 00:00:00 2001 From: maxlath Date: Fri, 10 Oct 2025 16:51:15 +0200 Subject: [PATCH] nginx: add /assets location to fit Vite build --- nginx/templates/default.conf.template | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nginx/templates/default.conf.template b/nginx/templates/default.conf.template index 2b2cb8b..39f3992 100755 --- a/nginx/templates/default.conf.template +++ b/nginx/templates/default.conf.template @@ -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 # with some correct headers for proxy-awareness location /api {