Skip to content

Commit bca6dab

Browse files
committed
docs: hide range-related headers from flask
This is to prevent flask from handling range requests when nginx is emulates range responses. Playing large opus files within firefox and gstreamer/mopidy worked for me only after I made this change in my nginx config. When using flask for streaming directly (without reverse-proxy), audio still doesn't play within firefox or gstreamer - prior to beets 1.6.1.
1 parent eeb3b4f commit bca6dab

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

README.rst

+8-4
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,12 @@ Configuration
5050
Proxy configuration for OGG files (optional)
5151
--------------------------------------------
5252

53-
You may want to configure an http proxy server in front of your Beets plugin
54-
(not mopidy). Otherwise you could have problems with playing OGG files and
55-
other formats that require seeking (in technical terms: support for http
56-
"Range" requests is required for these files).
53+
In case you use a beets version older than 1.6.1, you may need to configure
54+
an HTTP reverse-proxy server in front of the Beets web plugin (not mopidy)
55+
because `it does not handle HTTP "Range" requests properly <https://github.com/beetbox/beets/pull/5057>`_.
56+
If you don't apply this workaround, mopidy may not be able to stream/play
57+
large audio files and/or does not allow you to seek.
58+
The is the case for OGG files in particular.
5759

5860
The following Nginx configuration snippet is sufficient::
5961

@@ -65,6 +67,8 @@ The following Nginx configuration snippet is sufficient::
6567
proxy_pass http://localhost:8337;
6668
# this statement forces Nginx to emulate "Range" responses
6769
proxy_force_ranges on;
70+
# Hide Range header from beets/flask, preventing range handling
71+
proxy_set_header "Range" "";
6872
}
6973
}
7074

0 commit comments

Comments
 (0)