Created
May 17, 2020 19:16
-
-
Save morph027/b771fb579c36ae550ebb2764581a1d0e to your computer and use it in GitHub Desktop.
caddy2 ip filter
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
intranet.example.com { | |
@ipfilter { | |
not remote_ip 192.168.0.0/16 | |
} | |
route @ipfilter { | |
# redirect | |
redir https://example.com/ | |
# or respond | |
# respond "Access denied" 403 { | |
# close | |
# } | |
} | |
reverse_proxy / https://intranet.lan | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment