Restructure & extend health check config?

I stumbled over Lea (gay edition) :neocat_floof_happy: :gay_sex: (@lea) | 140 cats in a trench coat and while checking how to implement such an extension I noticed that the health check config options are a bit awkard in the Caddyfile (in JSON, it looks a bit more structured). What would you think about allowing an alternative syntax (and making it the default in the future?) of

health {
	method      <method>
	uri      <uri>
	port     <port>
	request_body     <body>
	interval <interval>
	timeout  <duration>
	status   <status>
	body     <regexp>
	follow_redirects
	headers {
		<field> [<values...>]
	}

(method & request_body are currently unimplemented)

Maybe even with a short form like the upstream address if you only want to specify host and/or port.

WDYT?

Regards, Tobias

Generally we prefer flatter config rather than deeper config, in the Caddyfile. That was a conscious decision in designing the config. It makes it easier to search for unique config properties in docs as well, etc. How do you search for uri, health_uri is easier to look for.

1 Like

This topic was automatically closed after 60 days. New replies are no longer allowed.