Skip to content

Instantly share code, notes, and snippets.

@morph027

morph027/Caddyfile

Created May 17, 2020
Embed
What would you like to do?
caddy2 ip filter
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