Skip to content

Instantly share code, notes, and snippets.

@cli-ish
Created December 19, 2025 10:52
Show Gist options
  • Select an option

  • Save cli-ish/bc15291ce26e0c64b9afcf22b21d06b5 to your computer and use it in GitHub Desktop.

Select an option

Save cli-ish/bc15291ce26e0c64b9afcf22b21d06b5 to your computer and use it in GitHub Desktop.
Caddy with reverse_proxy and bearer token setup for an alternate path
{
acme_ca https://acme.zerossl.com/v2/DV90
email your-email@example.com
}
YOURDOMAIN.EXAMPLE {
log {
output stdout
}
handle_path /container/ollama/* {
@auth {
not header Authorization "Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
respond @auth 401
reverse_proxy http://127.0.0.1:11434 {
header_up Host {http.reverse_proxy.upstream.hostport}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment