Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/nextcloud/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: nextcloud
version: 8.7.0
version: 8.7.1
# renovate: image=docker.io/library/nextcloud
appVersion: 32.0.3
description: A file sharing server that puts the control and security of your own data back into your hands.
Expand Down
20 changes: 15 additions & 5 deletions charts/nextcloud/files/nginx.config.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ upstream php-handler {
server 127.0.0.1:9000;
}

map $http_x_forwarded_proto $real_scheme {
default $scheme;
https https;
}

map $http_x_forwarded_port $real_port {
default $server_port;
443 443;
}

# Set the `immutable` cache control options only for assets with a cache busting `v` argument
map $arg_v $asset_immutable {
"" "";
Expand Down Expand Up @@ -87,7 +97,7 @@ server {
# Rule borrowed from `.htaccess` to handle Microsoft DAV clients
location = / {
if ( $http_user_agent ~ ^DavClnt ) {
return 302 /remote.php/webdav/$is_args$args;
return 302 $real_scheme://$host:$real_port/remote.php/webdav/$is_args$args;
}
}

Expand All @@ -104,12 +114,12 @@ server {
location ^~ /.well-known {
# The following 6 rules are borrowed from `.htaccess`

location = /.well-known/carddav { return 301 /remote.php/dav/; }
location = /.well-known/caldav { return 301 /remote.php/dav/; }
location = /.well-known/carddav { return 301 $real_scheme://$host:$real_port/remote.php/dav/; }
location = /.well-known/caldav { return 301 $real_scheme://$host:$real_port/remote.php/dav/; }

# Let Nextcloud's API for `/.well-known` URIs handle all other
# requests by passing them to the front-end controller.
return 301 /index.php$request_uri;
return 301 $real_scheme://$host:$real_port/index.php$request_uri;
}

# Rules borrowed from `.htaccess` to hide certain paths from clients
Expand Down Expand Up @@ -158,7 +168,7 @@ server {

# Rule borrowed from `.htaccess`
location /remote {
return 301 /remote.php$request_uri;
return 301 $real_scheme://$host:$real_port/remote.php$request_uri;
}

location / {
Expand Down
Loading