mirror of
https://github.com/hoellen/docker-nextcloud.git
synced 2025-07-01 15:46:13 +00:00
Use proxy forwarded headers if available for /.well-known redirects
This commit is contained in:
@ -1,3 +1,13 @@
|
||||
map $http_x_forwarded_port $nc_port {
|
||||
default "$http_x_forwarded_port";
|
||||
'' "$server_port";
|
||||
}
|
||||
|
||||
map $http_x_forwarded_proto $nc_proto {
|
||||
default "$http_x_forwarded_proto";
|
||||
'' "$scheme";
|
||||
}
|
||||
|
||||
server {
|
||||
listen 8888;
|
||||
root /nextcloud;
|
||||
@ -22,11 +32,11 @@ server {
|
||||
}
|
||||
|
||||
location = /.well-known/carddav {
|
||||
return 301 $scheme://$host:$server_port/remote.php/dav;
|
||||
return 301 $nc_proto://$host:$nc_port/remote.php/dav;
|
||||
}
|
||||
|
||||
location = /.well-known/caldav {
|
||||
return 301 $scheme://$host:$server_port/remote.php/dav;
|
||||
return 301 $nc_proto://$host:$nc_port/remote.php/dav;
|
||||
}
|
||||
|
||||
location / {
|
||||
|
Reference in New Issue
Block a user