Update nginx.conf

This commit is contained in:
Joseph Garrone 2024-02-15 16:56:43 +01:00 committed by GitHub
parent d55ea26edb
commit 58716e5826
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -21,20 +21,13 @@ server {
expires -1; expires -1;
} }
# CRA generates filenames with hashes so we can # Vite generates filenames with hashes so we can
# tell the browser to keep in cache the resources. # tell the browser to keep in cache the resources.
location ~* \.(?:css|js|md|woff2?|eot|ttf|xml)$ { location ~* \.(?:css|js|md|woff2?|eot|ttf|xml)$ {
expires 1y; expires 1y;
access_log off; access_log off;
add_header Cache-Control "public"; add_header Cache-Control "public";
# Allow fonts and scripts to be downloaded from pages
# served by Keycloak (CORS for --external-request)
# We allow .md for beeing able to fetch the terms of service.
location ~* \.(?:js|woff2?|eot|ttf|xml|md)$ {
add_header Access-Control-Allow-Origin *;
}
} }
} }