From 86ace9daf1381c27462dd11948e243c94dde87a7 Mon Sep 17 00:00:00 2001 From: Danilo Hoffmann Date: Fri, 22 Sep 2023 16:26:41 +0200 Subject: [PATCH] feat: render full response for bots --- nginx/templates/loading-fallback.conf.tmpl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nginx/templates/loading-fallback.conf.tmpl b/nginx/templates/loading-fallback.conf.tmpl index ab56884f89..401d0e7457 100644 --- a/nginx/templates/loading-fallback.conf.tmpl +++ b/nginx/templates/loading-fallback.conf.tmpl @@ -15,6 +15,15 @@ server { proxy_set_header Host $http_host; proxy_cache_bypass true; + # https://mailman.nginx.org/pipermail/nginx/2007-May/001031.html + if ($is_bot) { + rewrite ^(.*)$ /bot-bypass$1; + } + location /bot-bypass { + rewrite ^/bot-bypass(.*)$ $1 break; + proxy_pass http://real_server; + } + {{ if (has $mapping "channel") }} location / { proxy_pass http://real_server;