miekg / caddy-prometheus

Prometheus metrics middleware for caddy
Apache License 2.0
65 stars 26 forks source link

Allow listening to Caddy's address #35

Closed hairyhenderson closed 6 years ago

hairyhenderson commented 6 years ago

Fixes #30

This allows listening to the same port as Caddy, to simplify certain use-cases (allows binding to a single port instead of two).

I was going to change the default when no address is provided, but that would break existing configurations. Instead I've added an additional boolean parameter use_caddy_addr which will enable this feature. IMO it would be less surprising to enable this by default, but there seems not to be a good system for versioning Caddy plugins 🤷‍♂️

Signed-off-by: Dave Henderson dhenderson@gmail.com