From e535dd89098c419551d4b09b1c798aacb5f540b9 Mon Sep 17 00:00:00 2001 From: Ben Date: Mon, 11 Apr 2022 14:12:58 +0000 Subject: [PATCH] Exempt FriendlyCaptcha generation endpoint from caching engine#2272 --- containers/nginx/dev-ssr.conf.tpl | 4 ++++ containers/nginx/dev.conf | 4 ++++ containers/nginx/minds.conf | 4 ++++ engine | 2 +- front | 2 +- sockets | 2 +- 6 files changed, 15 insertions(+), 3 deletions(-) diff --git a/containers/nginx/dev-ssr.conf.tpl b/containers/nginx/dev-ssr.conf.tpl index fbb5107987..d312aaeb1b 100644 --- a/containers/nginx/dev-ssr.conf.tpl +++ b/containers/nginx/dev-ssr.conf.tpl @@ -50,6 +50,10 @@ server { try_files /index.html =404; } + if ($request_uri ~ /api/v3/friendly-captcha/puzzle) { + set $no_cache 1; + } + location / { root /var/www/Minds/front/dist/browser/$locale; diff --git a/containers/nginx/dev.conf b/containers/nginx/dev.conf index 429c41ef1d..afce0cafd8 100644 --- a/containers/nginx/dev.conf +++ b/containers/nginx/dev.conf @@ -79,6 +79,10 @@ server { set $no_cache 1; } + if ($request_uri ~ /api/v3/friendly-captcha/puzzle) { + set $no_cache 1; + } + # pass the PHP scripts to FastCGI server listening on socket location ~ \.php$ { add_header X-Cache $upstream_cache_status; diff --git a/containers/nginx/minds.conf b/containers/nginx/minds.conf index 0e32336a6b..b3191546e8 100644 --- a/containers/nginx/minds.conf +++ b/containers/nginx/minds.conf @@ -29,6 +29,10 @@ server { set $no_cache 1; } + if ($request_uri ~ /api/v3/friendly-captcha/puzzle) { + set $no_cache 1; + } + if ($http_x_forwarded_proto != "https") { rewrite ^/(.*)$ https://$host$REQUEST_URI permanent; } diff --git a/engine b/engine index 796da4fbaf..bbf3475ffd 160000 --- a/engine +++ b/engine @@ -1 +1 @@ -Subproject commit 796da4fbafb29d7212f1914b880ab123e7d1edd9 +Subproject commit bbf3475ffdb21ef05baaf205b398b31038fbefa7 diff --git a/front b/front index dd9e62b2bd..d857ba0547 160000 --- a/front +++ b/front @@ -1 +1 @@ -Subproject commit dd9e62b2bd3d21381abbecdd6acba4f30f9e0f60 +Subproject commit d857ba054746e25a1276a1eba2dd4bb220f931e0 diff --git a/sockets b/sockets index f2b7d088e4..8eb52f3c2c 160000 --- a/sockets +++ b/sockets @@ -1 +1 @@ -Subproject commit f2b7d088e49e30c187dea98c762865e986e5b09e +Subproject commit 8eb52f3c2c267d1d1e0219e74861ccdbbff84eb2