Skip to content

Commit 1ca7826

Browse files
committed
Reapply rate limiting fix after merge
1 parent dcd49bc commit 1ca7826

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docker/webserver/nginx_templates/app.conf.template

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,9 @@ server {
178178

179179
proxy_set_header REMOTE-USER $remote_user;
180180

181+
# forward client IP for rate limiting on tasks (see `redis_id.py` `req_limit`)
182+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
183+
181184
include /etc/nginx/conf.d/basic_auth.include;
182185
# set proxy_pass argument for 'app' container as variable, this way nginx doesn't fail when 'app' is unresolvable at startup
183186
set $app http://app:8080;
@@ -217,6 +220,8 @@ server {
217220
# pass host for Django's allowed_hosts
218221
proxy_set_header Host $host;
219222
proxy_set_header X-Forwarded-Proto $scheme;
223+
# forward client IP for rate limiting on tasks (see `redis_id.py` `req_limit`)
224+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
220225
# set proxy_pass argument for 'app' container as variable, this way nginx doesn't fail when 'app' is unresolvable at startup
221226
set $app http://app:8080;
222227
proxy_pass $app;

0 commit comments

Comments
 (0)