Skip to content

Instantly share code, notes, and snippets.

@tienthanh2509
Created July 15, 2021 11:07
Show Gist options
  • Save tienthanh2509/562e4c90b6783d92eb43bbdf6dd575d9 to your computer and use it in GitHub Desktop.
Save tienthanh2509/562e4c90b6783d92eb43bbdf6dd575d9 to your computer and use it in GitHub Desktop.
Caddy example reverve proxy
# 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