Browse Source

Only apply nginx ratelimit in prod

This is interfering with a few things in dev, including the debug
toolbar (since all of its assets are served by the app).
merge-requests/72/head
Deimos 5 years ago
parent
commit
730f0ea69a
  1. 2
      salt/salt/nginx/tildes.conf.jinja2

2
salt/salt/nginx/tildes.conf.jinja2

@ -73,8 +73,10 @@ server {
} }
location @proxy_to_app { location @proxy_to_app {
{% if grains["id"] == "prod" %}
# apply rate-limiting, allowing a burst above the limit # apply rate-limiting, allowing a burst above the limit
limit_req zone=tildes_app burst=5 nodelay; limit_req zone=tildes_app burst=5 nodelay;
{% endif -%}
# Cornice adds the X-Content-Type-Options header, so it will end up # Cornice adds the X-Content-Type-Options header, so it will end up
# being duplicated since nginx is also configured to send it (above). # being duplicated since nginx is also configured to send it (above).

Loading…
Cancel
Save