From 0823c881daf3f65ebe2896e141595a759bc91439 Mon Sep 17 00:00:00 2001 From: Sam Al-Sapti Date: Fri, 9 Feb 2024 18:19:02 +0100 Subject: [PATCH] Configure UnifiedPush for Nextcloud --- .../templates/nginx/conf.d/nextcloud.conf.j2 | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/roles/apps/templates/nginx/conf.d/nextcloud.conf.j2 b/roles/apps/templates/nginx/conf.d/nextcloud.conf.j2 index 68884b6..2c15cf7 100644 --- a/roles/apps/templates/nginx/conf.d/nextcloud.conf.j2 +++ b/roles/apps/templates/nginx/conf.d/nextcloud.conf.j2 @@ -23,8 +23,25 @@ server { proxy_read_timeout 86400s; client_body_buffer_size 512k; client_max_body_size 0; + + # UnifiedPush + proxy_connect_timeout 10m; + proxy_send_timeout 10m; + proxy_read_timeout 10m; } + # UnifiedPush + location /_matrix/push/v1/notify { + set $upstream http://nextcloud:80; + proxy_pass $upstream/index.php/apps/uppush/gateway/matrix; + + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto "https"; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $host; + } + + # CalDAV & CardDAV location ~^/\.well-known/(cal|card)dav$ { return 301 https://$host/remote.php/dav; }