jagd-apps/portal/extra8002.conf

109 lines
4.8 KiB
Plaintext

server {
listen 80;
server_name localhost;
client_max_body_size 20M;
# ──────────────────────────────────────────────
# Portal-Selektor (Webroot: /)
# ──────────────────────────────────────────────
root /usr/share/nginx/html/portal;
# Never cache sw.js and manifest.json (served from portal root)
location = /sw.js {
add_header Cache-Control "no-cache, no-store, must-revalidate";
expires 0;
}
location = /manifest.json {
add_header Cache-Control "no-cache, no-store, must-revalidate";
add_header Content-Type "application/manifest+json";
expires 0;
}
# ──────────────────────────────────────────────
# Nachsuche (/nachsuche/)
# ──────────────────────────────────────────────
location /nachsuche/api/ {
proxy_pass http://nachsuche-backend:5000/api/;
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 $http_x_forwarded_proto;
proxy_connect_timeout 60s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;
}
location /nachsuche/ {
proxy_pass http://nachsuche-frontend:80/;
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 $http_x_forwarded_proto;
proxy_connect_timeout 60s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;
}
# ──────────────────────────────────────────────
# Drohnenführer (/drohnenfuehrer/)
# ──────────────────────────────────────────────
location /drohnenfuehrer/api/ {
proxy_pass http://drohnenfuehrer-backend:5000/api/;
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 $http_x_forwarded_proto;
proxy_connect_timeout 60s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;
}
location /drohnenfuehrer/ {
proxy_pass http://drohnenfuehrer-frontend:80/;
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 $http_x_forwarded_proto;
proxy_connect_timeout 60s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;
}
# ──────────────────────────────────────────────
# Stöberhunde (/stoeberhunde/)
# ──────────────────────────────────────────────
location /stoeberhunde/api/ {
proxy_pass http://stoeberhunde-backend:5000/api/;
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 $http_x_forwarded_proto;
proxy_connect_timeout 60s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;
}
location /stoeberhunde/ {
proxy_pass http://stoeberhunde-frontend:80/;
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 $http_x_forwarded_proto;
proxy_connect_timeout 60s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;
}
# ──────────────────────────────────────────────
# Portal-Selektor catch-all (index.html)
# ──────────────────────────────────────────────
location / {
try_files $uri $uri/ /index.html;
add_header Cache-Control "no-cache, no-store, must-revalidate";
expires 0;
}
}