mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-11-15 16:12:51 +11:00
Some basic rate limiting
This commit is contained in:
parent
459e60a138
commit
51d9d6a8a7
1 changed files with 5 additions and 0 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
limit_req_zone $binary_remote_addr zone=login:10m rate=1r/s;
|
||||||
|
|
||||||
upstream app_server {
|
upstream app_server {
|
||||||
server 127.0.0.1:12000 fail_timeout=0;
|
server 127.0.0.1:12000 fail_timeout=0;
|
||||||
}
|
}
|
||||||
|
@ -73,6 +75,9 @@ server {
|
||||||
}
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
|
|
||||||
|
limit_req zone=login burst=5;
|
||||||
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header Host $http_host;
|
proxy_set_header Host $http_host;
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
|
|
Loading…
Reference in a new issue