From e1ea3218768e6cd326e366957926176e0fb43983 Mon Sep 17 00:00:00 2001 From: Max Goltzsche Date: Sat, 9 Dec 2023 00:52:42 +0100 Subject: [PATCH] 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. --- README.rst | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 9bf0685..600395a 100644 --- a/README.rst +++ b/README.rst @@ -50,10 +50,12 @@ Configuration Proxy configuration for OGG files (optional) -------------------------------------------- -You may want to configure an http proxy server in front of your Beets plugin -(not mopidy). Otherwise you could have problems with playing OGG files and -other formats that require seeking (in technical terms: support for http -"Range" requests is required for these files). +In case you use a beets version older than 1.6.1, you may need to configure +an HTTP reverse-proxy server in front of the Beets web plugin (not mopidy) +because [it does not handle HTTP "Range" requests properly](https://github.com/beetbox/beets/pull/5057). +If you don't apply this workaround, mopidy may not be able to stream/play +large audio files and/or does not allow you to seek. +The is the case for OGG files in particular. The following Nginx configuration snippet is sufficient:: @@ -65,6 +67,8 @@ The following Nginx configuration snippet is sufficient:: proxy_pass http://localhost:8337; # this statement forces Nginx to emulate "Range" responses proxy_force_ranges on; + # Hide Range header from beets/flask, preventing range handling + proxy_set_header "Range" ""; } }