microservices/gameboard-service/nginx.conf

25 lines
600 B
Nginx Configuration File
Raw Normal View History

2025-08-25 14:23:55 -07:00
server {
listen 3000;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
# Enable compression
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml text/javascript;
location / {
try_files $uri $uri/ /index.html;
expires 1h;
add_header Cache-Control "public, no-transform";
}
# Serve pre-compressed files if they exist
location ~ \.(?:js|css|html)$ {
gzip_static on;
expires 1h;
add_header Cache-Control "public, no-transform";
}
}