Skip to content

Commit

Permalink
Exempt FriendlyCaptcha generation endpoint from caching engine#2272
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben authored and markharding committed Apr 11, 2022
1 parent 39eab29 commit e535dd8
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 3 deletions.
4 changes: 4 additions & 0 deletions containers/nginx/dev-ssr.conf.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions containers/nginx/dev.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions containers/nginx/minds.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion engine
Submodule engine updated from 796da4 to bbf347
2 changes: 1 addition & 1 deletion front
Submodule front updated from dd9e62 to d857ba
2 changes: 1 addition & 1 deletion sockets

0 comments on commit e535dd8

Please sign in to comment.