Skip to content

Commit

Permalink
docs: support range requests w. gstreamer/firefox
Browse files Browse the repository at this point in the history
Playing large opus files within firefox and gstreamer/mopidy worked for me only after I made this change in my nginx config.
I guess this was not a problem previously since older flask versions did not support range queries at all but that seems to have changed partially since flask returns an `Accept-Ranges: bytes` header.
Though, when using flask for streaming directly (without reverse-proxy), audio still doesn't play within firefox or gstreamer.
gstreamer logged an error indicating the request is unsupported.
Both gstreamer and firefox started working only after I disabled passing through the range headers.
  • Loading branch information
mgoltzsche committed Dec 11, 2023
1 parent eeb3b4f commit 83a3a60
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ The following Nginx configuration snippet is sufficient::
proxy_pass http://localhost:8337;
# this statement forces Nginx to emulate "Range" responses
proxy_force_ranges on;
# Prevent flask server from handling range requests.
# (flask does not fully support range requests)
proxy_hide_header "Accept-Ranges";
proxy_set_header "Range" "";
}
}

Expand Down

0 comments on commit 83a3a60

Please sign in to comment.