Skip to content

Commit cc22ea5

Browse files
committed
Nextcloud header adjustments
Signed-off-by: Eric Nemchik <[email protected]>
1 parent 6eab17b commit cc22ea5

2 files changed

Lines changed: 18 additions & 6 deletions

File tree

nextcloud.subdomain.conf.sample

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Version 2023/06/06
1+
## Version 2023/06/24
22
# make sure that your nextcloud container is named nextcloud
33
# make sure that your dns has a cname set for nextcloud
44
# assuming this container is called "swag", edit your nextcloud container's config
@@ -32,8 +32,13 @@ server {
3232
set $upstream_proto https;
3333
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
3434

35-
# Uncomment X-Frame-Options directive in ssl.conf to pass security checks.
35+
# Hide proxy response headers from Nextcloud that conflict with ssl.conf
36+
proxy_hide_header Referrer-Policy;
37+
proxy_hide_header X-Content-Type-Options;
3638
proxy_hide_header X-Frame-Options;
39+
proxy_hide_header X-XSS-Protection;
40+
41+
# Disable proxy buffering
3742
proxy_buffering off;
3843
}
3944
}

nextcloud.subfolder.conf.sample

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Version 2023/06/06
1+
## Version 2023/06/24
22
# make sure that your nextcloud container is named nextcloud
33
# make sure that nextcloud is set to work with the base url /nextcloud/
44
# Assuming this container is called "swag", edit your nextcloud container's config
@@ -34,10 +34,17 @@ location ^~ /nextcloud/ {
3434
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
3535

3636
rewrite /nextcloud(.*) $1 break;
37-
# Uncomment X-Frame-Options directive in ssl.conf to pass security checks.
38-
proxy_hide_header X-Frame-Options;
39-
proxy_buffering off;
37+
4038
proxy_set_header Range $http_range;
4139
proxy_set_header If-Range $http_if_range;
4240
proxy_ssl_session_reuse off;
41+
42+
# Hide proxy response headers from Nextcloud that conflict with ssl.conf
43+
proxy_hide_header Referrer-Policy;
44+
proxy_hide_header X-Content-Type-Options;
45+
proxy_hide_header X-Frame-Options;
46+
proxy_hide_header X-XSS-Protection;
47+
48+
# Disable proxy buffering
49+
proxy_buffering off;
4350
}

0 commit comments

Comments
 (0)