From 713efd7dfa9fd9dabf5c5ab2299c61b186fca7d4 Mon Sep 17 00:00:00 2001 From: Alex Garel Date: Tue, 14 Nov 2023 09:40:07 +0100 Subject: [PATCH] chore: cache rule for assetlinks in nginx docker (#9290) --- conf/nginx.conf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/conf/nginx.conf b/conf/nginx.conf index 495e9cecfe152..4694d3b880afb 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -70,6 +70,14 @@ server { gunzip on; } + # GoogleAssociationService made 2500 requests/min to assetlinks.json + # and much less when caching headers are sent + location = /.well-known/assetlinks.json { + include conf.d/off.cors-headers.include; + expires 1d; + try_files $uri $uri/ =404; + } + location ~ /(favicon\.ico)$ { include conf.d/off.cors-headers.include; try_files $uri $uri/ =404;