Bypass Authelia auth for Calibre-Web OPDS feed

This commit is contained in:
Daniel Lo Nigro 2021-07-10 17:53:30 -07:00
parent f9d6d9ca4f
commit 44dbaa32b2
2 changed files with 35 additions and 0 deletions

View file

@ -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;
}
}

View file

@ -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;
}