Last active
June 7, 2018 18:36
-
-
Save mostafabahri/441c97b62c2c4e519f51f8dab56c57fa to your computer and use it in GitHub Desktop.
Reverse proxy and rate-limiting Caddy config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0.0.0.0:2015 { | |
gzip | |
log /tmp/caddy.log | |
proxy / localhost:9009 { # backend api | |
transparent | |
} | |
ratelimit * 3 5 second { # 3 req/sec & bursts of 5 | |
whitelist 192.168.1.0/24 | |
/admin | |
^/admin/static # to ignore static content | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ratelimit
plugin does not come with the default build. docs