Skip to content

Commit 7420ff6

Browse files
authored
Merge pull request #364 from Daniel15/calibre-web-opds
2 parents 8e3ba50 + 44dbaa3 commit 7420ff6

2 files changed

Lines changed: 35 additions & 0 deletions

File tree

calibre-web.subdomain.conf.sample

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ server {
2727
#error_page 401 =200 /ldaplogin;
2828

2929
# enable for Authelia
30+
# To use Authelia to log in to Calibre-Web, make sure "Reverse Proxy Login" is
31+
# enabled, "Reverse Proxy Header Name" is set to Remote-User, and each Authelia
32+
# user also has a corresponding user manually created in Calibre-Web.
3033
#include /config/nginx/authelia-location.conf;
3134

3235
include /config/nginx/proxy.conf;
@@ -38,4 +41,18 @@ server {
3841

3942
proxy_set_header X-Scheme $scheme;
4043
}
44+
45+
# OPDS feed for eBook reader apps
46+
# Even if you use Authelia, the OPDS feed requires a password to be set for
47+
# the user directly in Calibre-Web, as eBook reader apps don't support
48+
# form-based logins, only HTTP Basic auth.
49+
location /opds/ {
50+
include /config/nginx/proxy.conf;
51+
include /config/nginx/resolver.conf;
52+
set $upstream_app calibre-web;
53+
set $upstream_port 8083;
54+
set $upstream_proto http;
55+
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
56+
proxy_set_header X-Scheme $scheme;
57+
}
4158
}

calibre-web.subfolder.conf.sample

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ location ^~ /calibre-web/ {
1515
#error_page 401 =200 /ldaplogin;
1616

1717
# enable for Authelia, also enable authelia-server.conf in the default site config
18+
# To use Authelia to log in to Calibre-Web, make sure "Reverse Proxy Login" is
19+
# enabled, "Reverse Proxy Header Name" is set to Remote-User, and each Authelia
20+
# user also has a corresponding user manually created in Calibre-Web.
1821
#include /config/nginx/authelia-location.conf;
1922

2023
include /config/nginx/proxy.conf;
@@ -27,3 +30,18 @@ location ^~ /calibre-web/ {
2730
proxy_set_header X-Scheme $scheme;
2831
proxy_set_header X-Script-Name /calibre-web;
2932
}
33+
34+
# OPDS feed for eBook reader apps
35+
# Even if you use Authelia, the OPDS feed requires a password to be set for
36+
# the user directly in Calibre-Web, as eBook reader apps don't support
37+
# form-based logins, only HTTP Basic auth.
38+
location ^~ /calibre-web/opds/ {
39+
include /config/nginx/proxy.conf;
40+
include /config/nginx/resolver.conf;
41+
set $upstream_app calibre-web;
42+
set $upstream_port 8083;
43+
set $upstream_proto http;
44+
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
45+
proxy_set_header X-Scheme $scheme;
46+
proxy_set_header X-Script-Name /calibre-web;
47+
}

0 commit comments

Comments
 (0)