fix
This commit is contained in:
parent
e91368ccb7
commit
96080d774b
25
Caddyfile
25
Caddyfile
@ -21,7 +21,7 @@
|
||||
header X-Forwarded-Proto {scheme}
|
||||
|
||||
request_body {
|
||||
max_size 10MB
|
||||
max_size 50MB
|
||||
}
|
||||
}
|
||||
|
||||
@ -36,17 +36,28 @@
|
||||
}
|
||||
}
|
||||
|
||||
(geoblock) {
|
||||
@non_china_block {
|
||||
(geo_only_allow_country) {
|
||||
@only_allow_country_geofilter {
|
||||
not {
|
||||
maxmind_geolocation {
|
||||
db_path "/geodb/GeoLite2-Country.mmdb"
|
||||
allow_countries CN
|
||||
db_path "/config/geodb/GeoLite2-Country.mmdb"
|
||||
allow_countries {args[0]}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
respond @non_china_block "You are blocked" 403
|
||||
respond @only_allow_country_geofilter "You are blocked" 403
|
||||
}
|
||||
|
||||
(geo_not_allow_country) {
|
||||
@not_allow_country_geofilter {
|
||||
maxmind_geolocation {
|
||||
db_path "/config/geodb/GeoLite2-Country.mmdb"
|
||||
allow_countries {args[0]}
|
||||
}
|
||||
}
|
||||
|
||||
respond @not_allow_country_geofilter "You are blocked" 403
|
||||
}
|
||||
|
||||
:443 {
|
||||
@ -54,4 +65,4 @@
|
||||
respond 404
|
||||
}
|
||||
|
||||
import /conf/*
|
||||
import /conf/*.caddyfile
|
||||
|
Loading…
x
Reference in New Issue
Block a user