Files
rin.kagamine ca18f03a0f fix: nginx audio streaming - pass Range headers for proper playback
The nginx proxy was stripping Range and If-Range headers, forcing the
browser to buffer entire MP3 files before playback could start.
Added Range header passthrough, disabled proxy_buffering for audio
streaming, and increased read timeout.
2026-05-31 10:19:06 -04:00

29 lines
742 B
Nginx Configuration File

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;
}
}