Files
validator/OmCTF-2025/services/polyphonia/nginx/nginx.conf

41 lines
1.1 KiB
Nginx Configuration File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
events {
worker_connections 1024;
}
http {
include mime.types;
server {
listen 80;
server_name localhost;
proxy_connect_timeout 5s;
proxy_send_timeout 5s;
proxy_read_timeout 5s;
location / {
root /frontend-dist;
index index.html;
expires 30d;
add_header Cache-Control "public, immutable";
access_log off;
}
location /api/ {
proxy_pass http://polyphonia-binary-server:3000;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
root /frontend-dist; # Files will be read from /frontend-dist$uri
try_files $uri =404; # Dont fall back to upstream if missing
expires 30d;
add_header Cache-Control "public, immutable";
access_log off;
}
}
}