-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The name example.Caddyfile
is not considered a valid Caddyfile
#5909
Comments
Any file that starts with Caddyfile will automatically be assumed to be a Caddyfile. From our docs:
So you can always specify the adapter name if the file name doesn't conform. That said, I wonder if we should treat any file name that has Caddyfile in it as a Caddyfile... but maybe that's too liberal. |
OSes and editors expect to know a file by its specific name, suffix, or magic bytes. the only other file type I know of that started out with using a prefix as its type identifier is Being consistent with decades long tried and true conventions is generally good for machines and users alike. |
Docker does this with the Dockerfile though too. And Vagrant has the Vagrantfile. It's not something we invented nor is it uncommon. Docker is practically everywhere. But yeah, maybe containing the word Caddyfile is good enough, since it would have to be explicitly given as the config file anyway, so I don't foresee many false positives here. We only automatically use files named exactly Caddyfile. |
I think |
Case insensitive options would also be good for those that are allergic to the shift key. |
Hi @mholt and @francislavoie, I've submitted a pull request to handle this case. |
But if I simply rename the:
Then it works as expected.
It seems like
.Caddyfile
(or really anything that isn't.json
) should be considered a Caddyfile unless some sort of matching logic for some particular adapter says otherwise.The text was updated successfully, but these errors were encountered: