keycloakify-custom/nginx.conf

36 lines
872 B
Nginx Configuration File
Raw Normal View History

2022-09-06 17:22:23 +00:00
server {
listen 80;
gzip on;
gzip_vary on;
gzip_min_length 1024;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/javascript application/xml;
gzip_disable "MSIE [1-6]\.";
root /usr/share/nginx/html;
index index.html;
try_files $uri $uri/ /index.html;
# Any route containing a file extension (e.g. /devicesfile.js)
location ~ ^.+\..+$ {
try_files $uri =404;
location ~* \.(?:html|json|txt)$ {
expires -1;
}
2024-02-15 15:56:43 +00:00
# Vite generates filenames with hashes so we can
2022-09-06 17:22:23 +00:00
# tell the browser to keep in cache the resources.
location ~* \.(?:css|js|md|woff2?|eot|ttf|xml)$ {
expires 1y;
access_log off;
add_header Cache-Control "public";
}
}
}