From 119016e8589c2e6477c1224a146318f76d7b368f Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Tue, 5 Feb 2019 13:06:17 +0200 Subject: [PATCH] Cache /.well-known/matrix files for longer --- .../templates/nginx/conf.d/matrix-synapse.conf.j2 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/roles/matrix-nginx-proxy/templates/nginx/conf.d/matrix-synapse.conf.j2 b/roles/matrix-nginx-proxy/templates/nginx/conf.d/matrix-synapse.conf.j2 index c618f789c..17f676963 100644 --- a/roles/matrix-nginx-proxy/templates/nginx/conf.d/matrix-synapse.conf.j2 +++ b/roles/matrix-nginx-proxy/templates/nginx/conf.d/matrix-synapse.conf.j2 @@ -41,7 +41,12 @@ server { location /.well-known/matrix { root {{ matrix_static_files_base_path }}; - expires 1m; + {# + A somewhat long expires value is used to prevent outages + in case this is unreachable due to network failure or + due to the base domain's server completely dying. + #} + expires 4h; default_type application/json; add_header Access-Control-Allow-Origin *; }