by
3 7
0
2
129k
1
Top 1% !
Pearl of Wisdom
Popularity: 15930th place
Created
Modified Sep 12, 2016

Published on:

No tags for this snippet yet.
LanguageNGinx
SourceGitHub

request flood  protection rate limiting nginx

request flood  protection rate limiting nginx: 
nginx-rate_limit_flood_protect.conf
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/1437206/request-flood--protection-rate-limiting-?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
# To enable rate limiting simply add the following line to the top-level of your config file: # 1 request / second limit_req_zone $binary_remote_addr zone=login:10m rate=1r/s; # Then apply it to a location by adding a rate limiting burst to your server block: location /account/login/ { # apply rate limiting limit_req zone=login burst=5; # boilerplate copied from location / proxy_pass http://myapp; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; }
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus