server { listen 3000; server_name localhost; root /usr/share/nginx/html; index index.html; # Increase proxy buffer sizes for audio streaming client_max_body_size 100M; location / { try_files $uri $uri/ /index.html; } location /api { proxy_pass http://backend:8000; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; # Enable audio streaming with range requests proxy_set_header Range $http_range; proxy_set_header If-Range $http_if_range; proxy_set_header Connection ""; proxy_buffering off; # Allow large responses (audio files) proxy_read_timeout 300s; } }