11119
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
f1d9492414
commit
7a236de399
@ -0,0 +1,46 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
root /app/.output/public;
|
||||
index index.html;
|
||||
|
||||
# Proper MIME type handling
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
# Security headers
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
add_header X-Frame-Options SAMEORIGIN;
|
||||
add_header X-XSS-Protection "1; mode=block";
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# Handle static files
|
||||
location /_nuxt/ {
|
||||
alias /app/.output/public/_nuxt/;
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, no-transform";
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
# Handle other static files
|
||||
location /public/ {
|
||||
alias /app/public/;
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, no-transform";
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
# Handle API requests
|
||||
location /api/ {
|
||||
proxy_pass http://localhost:3000;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_set_header Host $host;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
}
|
||||
}
|
Loading…
Reference in new issue