forked from ppfun/pixelplanet
update nginx example config
This commit is contained in:
parent
9a22be25cc
commit
3f2bb8c530
|
@ -12,10 +12,6 @@
|
||||||
include /etc/nginx/includes/certbotroot.conf;
|
include /etc/nginx/includes/certbotroot.conf;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_no_cache 1;
|
|
||||||
if ($http_user_agent ~* (python-requests)) {
|
|
||||||
return 503;
|
|
||||||
}
|
|
||||||
limit_req zone=general burst=20 delay=10;
|
limit_req zone=general burst=20 delay=10;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
client_max_body_size 3M;
|
client_max_body_size 3M;
|
||||||
|
@ -23,9 +19,7 @@ location / {
|
||||||
}
|
}
|
||||||
|
|
||||||
location = / {
|
location = / {
|
||||||
if ($http_user_agent ~* (python-requests)) {
|
proxy_no_cache 1;
|
||||||
return 503;
|
|
||||||
}
|
|
||||||
if ( $query_string ) { return 403; }
|
if ( $query_string ) { return 403; }
|
||||||
limit_req zone=captcha burst=5;
|
limit_req zone=captcha burst=5;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user