mirror of
https://gitlab.com/keys.openpgp.org/hagrid.git
synced 2025-10-06 00:23:08 +02:00
nginx: add option for loose rate limiting
This commit is contained in:
@@ -59,6 +59,7 @@ location /vks {
|
||||
|
||||
location /vks/v1/by-email/ {
|
||||
limit_req zone=search_email burst=50 nodelay;
|
||||
limit_req zone=search_email_loose burst=200 nodelay;
|
||||
error_page 429 /errors-static/429-rate-limit-vks-email.htm;
|
||||
|
||||
set $args "";
|
||||
@@ -105,6 +106,7 @@ location /pks/lookup {
|
||||
location /.well-known/openpgpkey {
|
||||
location ~ "^/.well-known/openpgpkey/([^/]+)/hu/([^/][^/])([^/][^/])(.*)" {
|
||||
limit_req zone=search_email burst=50 nodelay;
|
||||
limit_req zone=search_email_loose burst=200 nodelay;
|
||||
error_page 429 /errors-static/429-rate-limit-vks-email.htm;
|
||||
|
||||
error_page 404 /errors-static/404-wkd.htm;
|
||||
@@ -187,6 +189,7 @@ location /pks/internal {
|
||||
# gpg --search-keys <QUERY>
|
||||
location ~ ^/pks/internal/index/(.+(?:%40|@).+)$ {
|
||||
limit_req zone=search_email burst=50 nodelay;
|
||||
limit_req zone=search_email_loose burst=200 nodelay;
|
||||
limit_req_status 429;
|
||||
error_page 429 /errors-static/429-rate-limit-pks-index.htm;
|
||||
|
||||
@@ -219,6 +222,7 @@ location /errors {
|
||||
|
||||
location /search {
|
||||
limit_req zone=search_email burst=50 nodelay;
|
||||
limit_req zone=search_email_loose burst=200 nodelay;
|
||||
error_page 429 /errors/429/rate-limit-web;
|
||||
proxy_pass http://127.0.0.1:8080;
|
||||
}
|
||||
|
Reference in New Issue
Block a user