Skip to content

Instantly share code, notes, and snippets.

@zonca
Created September 23, 2025 01:04
Show Gist options
  • Select an option

  • Save zonca/76cf2e9faed6637ea745c2e211118c91 to your computer and use it in GitHub Desktop.

Select an option

Save zonca/76cf2e9faed6637ea745c2e211118c91 to your computer and use it in GitHub Desktop.
Caddy configuration for /health JSON endpoint
my.url.com {
# Set this path to your site's directory.
root * /usr/share/caddy
# Enable the static file server.
file_server
@health {
path /health
}
respond @health `{"status":"healthy"}` 200
header @health Content-Type application/json
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment