diff --git a/scripts/calibre-web-nginx.conf b/scripts/calibre-web-nginx.conf index 1187ee270d..08342b54a4 100644 --- a/scripts/calibre-web-nginx.conf +++ b/scripts/calibre-web-nginx.conf @@ -1,7 +1,33 @@ # RELATED: https://github.com/janeczku/calibre-web/wiki/Setup-Reverse-Proxy -# http://box/library/calibre-web///<webm_or_mp4_video_file> -location /library/calibre-web/ { - alias /library/www/html/calibre-web/; - fancyindex on; # autoindex on; +# 2023-12-04: This is part of an (interim?) workaround so that playback of +# larger videos actually works. Far better would be a proper MM (memory +# management) solution that respects Calibre-Web's existing username/password +# security model. Can anybody suggest concrete ideas to make that happen? +# +# The failure of large videos to play is summarized here: +# https://github.com/iiab/calibre-web/issues/37 +# +# This (perhaps imperfect) proposed solution is emerging here: +# https://github.com/iiab/calibre-web/pull/50 +# https://github.com/iiab/calibre-web/pull/51 +# https://github.com/iiab/calibre-web/issues/53 +# https://github.com/iiab/iiab/pull/3676 +# https://github.com/iiab/calibre-web/pull/55 +# https://github.com/iiab/calibre-web/pull/56 +# https://github.com/iiab/calibre-web/pull/57 + +# http://box/books-direct/<author>/<title>/<webm_or_mp4_video_file> + +# Align NGINX path (e.g. "books-direct") with Line ~1580 of: +# https://github.com/iiab/calibre-web/blob/master/cps/web.py +location /books-direct/ { + alias /library/calibre-web/; + #autoindex off; # Directory listings (should be off by default?) + + # Deny access to all other content: https://serverfault.com/a/222928 + location /books-direct/ { deny all; } + + # Allow serving of .webm and .mp4 files + location ~* \.(webm|mp4)$ { } }