From ca18f03a0f07330e3492658e39170a98fa2db50b Mon Sep 17 00:00:00 2001 From: Kagamine Rin Date: Sun, 31 May 2026 10:19:06 -0400 Subject: [PATCH] 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. --- frontend/nginx.conf | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/frontend/nginx.conf b/frontend/nginx.conf index ad2c85c..021d4f0 100644 --- a/frontend/nginx.conf +++ b/frontend/nginx.conf @@ -4,6 +4,9 @@ server { 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; } @@ -13,5 +16,14 @@ server { 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; } -} +} \ No newline at end of file