Created
July 15, 2021 11:07
-
-
Save tienthanh2509/562e4c90b6783d92eb43bbdf6dd575d9 to your computer and use it in GitHub Desktop.
Caddy example reverve proxy
This file contains hidden or 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
# Hide original hostname, skip ssl check destination host, remove forwarded ip/protocol, http only | |
http://example.com { | |
reverse_proxy { | |
to https://1.2.3.4 | |
header_up -X-Forwarded-For | |
header_up -X-Forwarded-Proto | |
header_up -Host | |
header_up Host httpbin.net | |
transport http { | |
tls_insecure_skip_verify | |
tls_server_name httpbin.org | |
} | |
} | |
tls internal { | |
on_demand | |
} | |
} | |
# Simple https self-signed reverse proxy | |
example2.com { | |
reverse_proxy { | |
to https://httpbin.org | |
} | |
tls internal { | |
on_demand | |
} | |
} | |
# Simple https auto cert reverse proxy | |
example2.com { | |
reverse_proxy { | |
to https://httpbin.org | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment