Created
May 27, 2015 19:43
-
-
Save johnewart/6d6adeb9f9e0affcf6f4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
limit_req_zone $binary_remote_addr zone=one:100m rate=3r/s; | |
limit_req_zone $projectid zone=two:100m rate=6r/s; | |
limit_req_status 429; | |
limit_req_log_level warn; | |
server { | |
listen 80; | |
location / { | |
proxy_pass http://internal; | |
} | |
location ~* /api/(?P<projectid>\d+/)?store/ { | |
proxy_pass http://internal; | |
limit_req zone=one burst=3 nodelay; | |
limit_req zone=two burst=10 nodelay; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment