diff --git a/calibre-web.subdomain.conf.sample b/calibre-web.subdomain.conf.sample index 1265b24..fa2361e 100644 --- a/calibre-web.subdomain.conf.sample +++ b/calibre-web.subdomain.conf.sample @@ -27,6 +27,9 @@ server { #error_page 401 =200 /ldaplogin; # enable for Authelia + # To use Authelia to log in to Calibre-Web, make sure "Reverse Proxy Login" is + # enabled, "Reverse Proxy Header Name" is set to Remote-User, and each Authelia + # user also has a corresponding user manually created in Calibre-Web. #include /config/nginx/authelia-location.conf; include /config/nginx/proxy.conf; @@ -38,4 +41,18 @@ server { proxy_set_header X-Scheme $scheme; } + + # OPDS feed for eBook reader apps + # Even if you use Authelia, the OPDS feed requires a password to be set for + # the user directly in Calibre-Web, as eBook reader apps don't support + # form-based logins, only HTTP Basic auth. + location /opds/ { + include /config/nginx/proxy.conf; + include /config/nginx/resolver.conf; + set $upstream_app calibre-web; + set $upstream_port 8083; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + proxy_set_header X-Scheme $scheme; + } } diff --git a/calibre-web.subfolder.conf.sample b/calibre-web.subfolder.conf.sample index 0b7ced7..a9d007f 100644 --- a/calibre-web.subfolder.conf.sample +++ b/calibre-web.subfolder.conf.sample @@ -15,6 +15,9 @@ location ^~ /calibre-web/ { #error_page 401 =200 /ldaplogin; # enable for Authelia, also enable authelia-server.conf in the default site config + # To use Authelia to log in to Calibre-Web, make sure "Reverse Proxy Login" is + # enabled, "Reverse Proxy Header Name" is set to Remote-User, and each Authelia + # user also has a corresponding user manually created in Calibre-Web. #include /config/nginx/authelia-location.conf; include /config/nginx/proxy.conf; @@ -27,3 +30,18 @@ location ^~ /calibre-web/ { proxy_set_header X-Scheme $scheme; proxy_set_header X-Script-Name /calibre-web; } + +# OPDS feed for eBook reader apps +# Even if you use Authelia, the OPDS feed requires a password to be set for +# the user directly in Calibre-Web, as eBook reader apps don't support +# form-based logins, only HTTP Basic auth. +location ^~ /calibre-web/opds/ { + include /config/nginx/proxy.conf; + include /config/nginx/resolver.conf; + set $upstream_app calibre-web; + set $upstream_port 8083; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + proxy_set_header X-Scheme $scheme; + proxy_set_header X-Script-Name /calibre-web; +}