Skip to content

Commit

Permalink
Merge branch 'hotfix/2025-01-16_bulk_api_to_bg_server'
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven-Eardley committed Jan 16, 2025
2 parents 3d2969b + 106f895 commit a370260
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions deploy/nginx/production/doaj
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,21 @@ server {
rewrite ^(.*)$ $new_uri permanent;
}

# Use the background server for bulk API requests, since that's where the event consumer runs
location ~ /api(.*)/bulk {
if ($http_user_agent ~* (bot|spider) ) {
return 403;
}
limit_req zone=api burst=8 nodelay;
proxy_pass http://doaj_bg_apps;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off;
}

location /api {
if ($http_user_agent ~* (bot|spider) ) {
return 403;
Expand Down

0 comments on commit a370260

Please sign in to comment.