Perform webdav authentication in nginx, fixes #330
This commit is contained in:
@@ -100,6 +100,9 @@ http {
|
|||||||
{% if WEBDAV != 'none' %}
|
{% if WEBDAV != 'none' %}
|
||||||
location /webdav {
|
location /webdav {
|
||||||
rewrite ^/webdav/(.*) /$1 break;
|
rewrite ^/webdav/(.*) /$1 break;
|
||||||
|
auth_request /internal/auth/basic;
|
||||||
|
auth_request_set $user $upstream_http_x_user;
|
||||||
|
proxy_set_header X-Remote-User $user;
|
||||||
proxy_pass http://$webdav;
|
proxy_pass http://$webdav;
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -108,6 +111,8 @@ http {
|
|||||||
location /internal {
|
location /internal {
|
||||||
internal;
|
internal;
|
||||||
|
|
||||||
|
proxy_set_header Authorization $http_authorization;
|
||||||
|
proxy_pass_header Authorization;
|
||||||
proxy_pass http://$admin;
|
proxy_pass http://$admin;
|
||||||
proxy_pass_request_body off;
|
proxy_pass_request_body off;
|
||||||
proxy_set_header Content-Length "";
|
proxy_set_header Content-Length "";
|
||||||
|
|||||||
@@ -4,27 +4,19 @@ daemon = False
|
|||||||
ssl = False
|
ssl = False
|
||||||
dns_lookup = False
|
dns_lookup = False
|
||||||
realm = Radicale - Password Required
|
realm = Radicale - Password Required
|
||||||
base_prefix = /webdav/
|
|
||||||
|
|
||||||
[encoding]
|
[encoding]
|
||||||
request = utf-8
|
request = utf-8
|
||||||
stock = utf-8
|
stock = utf-8
|
||||||
|
|
||||||
[well-known]
|
|
||||||
|
|
||||||
[auth]
|
[auth]
|
||||||
type = IMAP
|
type = http_x_remote_user
|
||||||
imap_hostname = front
|
|
||||||
imap_port = 10143
|
|
||||||
imap_ssl = False
|
|
||||||
|
|
||||||
[git]
|
|
||||||
|
|
||||||
[rights]
|
[rights]
|
||||||
type = owner_only
|
type = owner_only
|
||||||
|
|
||||||
[storage]
|
[storage]
|
||||||
type = filesystem
|
type = multifilesystem
|
||||||
filesystem_folder = /data
|
filesystem_folder = /data
|
||||||
|
|
||||||
[logging]
|
[logging]
|
||||||
|
|||||||
Reference in New Issue
Block a user