Caddy(8)

πŸ’– Caddy(8) β€” caddy-reverse-proxy πŸ’–

okay bestie, welcome to the caddy-reverse-proxy page from the Caddy(8) manual, and no cap this one is a whole vibe ✨


🌸 NAME 🌸

caddy-reverse-proxy β€” a quick and production-ready reverse proxy 🫢


✨ SYNOPSIS ✨

[--insecure] [--internal-certs] [--disable-redirects] [--header-up
"Field: value"] [--header-down "Field: value"] [--access-log] [--debug]
[flags]

πŸ¦‹ DESCRIPTION πŸ¦‹

A simple but production-ready reverse proxy. It's giving "I set this up in like four seconds for a demo" energy. Super useful for quick deployments, demos, and development πŸ’…

Literally all it does is shuttle HTTP(S) traffic from the --from address to the --to address. That's it. That's the whole job. And you can specify multiple --to addresses by repeating the flag, periodt πŸ‘‘

Unless the addresses themselves say otherwise, the --from address is assumed to be HTTPS if a hostname is given, and the --to address is assumed to be HTTP. So it just... knows. main character energy fr fr.

If the --from address has a host or IP, Caddy will attempt to serve the proxy over HTTPS with a certificate β€” unless that's overridden by the HTTP scheme or port. Not me being polite about it, it literally respects your override 😭

🌈 If serving HTTPS:

  • --disable-redirects can be used to avoid binding to the HTTP port.
  • --internal-certs can be used to force issuance certs using the internal CA instead of attempting to issue a public certificate.

πŸ”₯ For proxying:

  • --header-up can be used to set a request header to send to the upstream.
  • --header-down can be used to set a response header to send back to the client.
  • --change-host-header sets the Host header on the request to the address of the upstream, instead of defaulting to the incoming Host header. This is a shortcut for --header-up "Host: {http.reverse_proxy.upstream.hostport}". Ate. πŸ’…
  • --insecure disables TLS verification with the upstream. WARNING: THIS DISABLES SECURITY BY NOT VERIFYING THE UPSTREAM'S CERTIFICATE. bestie I'm begging you, know what you're doing here πŸ™ˆ

πŸŽ€ OPTIONS πŸŽ€

  • --access-log[=false] β€” Enable the access log. You get receipts ✨
  • -c, --change-host-header[=false] β€” Set upstream Host header to address of upstream.
  • -v, --debug[=false] β€” Enable verbose debug logs. Chaos, but make it legible πŸ’€
  • -r, --disable-redirects[=false] β€” Disable HTTP->HTTPS redirects.
  • -f, --from="localhost" β€” Address on which to receive traffic.
  • -d, --header-down=[] β€” Set a response header to send back to the client (format: "Field: value").
  • -H, --header-up=[] β€” Set a request header to send to the upstream (format: "Field: value").
  • -h, --help[=false] β€” help for reverse-proxy.
  • --insecure[=false] β€” Disable TLS verification (WARNING: DISABLES SECURITY BY NOT VERIFYING TLS CERTIFICATES! 🚨).
  • -i, --internal-certs[=false] β€” Use internal CA for issuing certs.
  • -t, --to=[] β€” Upstream address(es) to which traffic should be sent.

🫢 SEE ALSO 🫢

  • caddy(8) β€” go read the big one, iykyk πŸ’œ

πŸ“œ HISTORY πŸ“œ

1-Jan-0001 β€” Auto generated by spf13/cobra 🧚


aaaand that's the whole page bestie 🌸 this one was auto generated by spf13/cobra, dated Jan 0001, living in the Caddy(8) manual. slay, go proxy something πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from