Files
andros d5377e94eb Initial implementation of push notification backend
Django backend that listens to the relay SSE global stream and dispatches
APNs push notifications to subscribed iOS devices (TestFlight/sandbox).
2026-05-19 09:34:46 +02:00

55 lines
1.2 KiB
Nginx Configuration File

events {
worker_connections 1024;
}
http {
upstream django_app {
server django:8000;
}
server {
listen 80;
server_name _;
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
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;
proxy_connect_timeout 60s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;
location / {
proxy_pass http://django_app;
}
location /nginx-health {
access_log off;
return 200 "healthy\n";
add_header Content-Type text/plain;
}
}
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
client_max_body_size 1M;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
gzip on;
gzip_vary on;
gzip_min_length 1024;
gzip_proxied any;
gzip_comp_level 6;
gzip_types text/plain application/json application/javascript;
}