caddyserver / caddy

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
https://caddyserver.com
Apache License 2.0
55.48k stars 3.91k forks source link

cmd: remove zealous check of Caddyfile auto-detection #6370

Closed mohammed90 closed 3 weeks ago

mohammed90 commented 4 weeks ago

Turns out, it isn't uncommon to have Caddyfile.prod and such (https://github.com/caddyserver/caddy/pull/6362#discussion_r1623414880). This is mentioned on the website as:

This flag is not necessary if the --config filename starts with "Caddyfile" which assumes the caddyfile adapter

Source

Fixes https://github.com/caddyserver/caddy/issues/6373

mholt commented 4 weeks ago

If only we had telemetry to know things like this :upside_down_face:

Thanks. Do we have a test case for the use case though? We should probably add one.

mohammed90 commented 4 weeks ago

Do we have a test case for the use case though? We should probably add one.

Added. I have a feeling deep in my heart I might've missed some case or condition. What am I missing?

mholt commented 3 weeks ago

Hmm do we have a test case for any Caddyfile paths without ./? Could be worth trying just in case but I bet they're OK. But at this point I'm happy to merge it when you are. :+1:

mohammed90 commented 3 weeks ago

Go 🚗