From e0b705e860ef660138a1c49ee1dfdea195963ebb Mon Sep 17 00:00:00 2001 From: Jonathan Chan Date: Sun, 25 Oct 2020 12:21:08 -0700 Subject: [PATCH] Fix nginx settings for Nextcloud. --- next.ionathan.ch | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/next.ionathan.ch b/next.ionathan.ch index 195a562..3a82643 100644 --- a/next.ionathan.ch +++ b/next.ionathan.ch @@ -2,6 +2,7 @@ server { server_name next.ionathan.ch; client_max_body_size 512M; + add_header Strict-Transport-Security "max-age=15552000; includeSubDomains" always; location / { proxy_pass http://localhost:8080; @@ -9,10 +10,10 @@ server { proxy_set_header X-Real-IP $remote_addr; } location = /.well-known/carddav { - return 301 http://localhost:8080/remote.php/dav; + return 301 $scheme://$host/remote.php/dav; } location = /.well-known/caldav { - return 301 http://localhost:8080/remote.php/dav; + return 301 $scheme://$host/remote.php/dav; } listen [::]:443 ssl; # managed by Certbot @@ -37,4 +38,4 @@ server { return 404; # managed by Certbot -} \ No newline at end of file +}