threejs-test/nginx.conf
Juan Sebastian Montoya 323f0be900
All checks were successful
Build and Publish Docker Image / Publish to Registry (push) Successful in 8s
Build and Publish Docker Image / Deploy to Portainer (push) Successful in 2s
Feature/Gameloop enhancements (#17)
Reviewed-on: #17
Co-authored-by: Juan Sebastian Montoya <juansmm@outlook.com>
Co-committed-by: Juan Sebastian Montoya <juansmm@outlook.com>
2025-11-26 17:53:40 -05:00

38 lines
986 B
Nginx Configuration File

server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ =404;
}
# Prevent caching of JavaScript files and version.json
location ~* \.(js|mjs)$ {
add_header Cache-Control "no-cache, no-store, must-revalidate";
add_header Pragma "no-cache";
add_header Expires "0";
add_header Vary "Accept-Encoding";
}
location = /version.json {
add_header Cache-Control "no-cache, no-store, must-revalidate";
add_header Pragma "no-cache";
add_header Expires "0";
}
# Prevent caching of HTML
location ~* \.html$ {
add_header Cache-Control "no-cache, no-store, must-revalidate";
add_header Pragma "no-cache";
add_header Expires "0";
}
# Enable gzip compression
gzip on;
gzip_types text/html text/css application/javascript;
gzip_min_length 1000;
}