-
-
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
Setting default block (:80) alongside http domain triggers auto-https #4113
Comments
Could you please try with |
Just tested on v2.4.0-beta.2 - issue is still there. Caddyfile entry:
From the log:
|
I can confirm the issue, the adapted JSON looks like this, for this Caddyfile:
{
"apps": {
"http": {
"servers": {
"srv0": {
"listen": [
":80"
],
"routes": [
{
"handle": [
{
"body": "Foo",
"handler": "static_response"
}
]
}
]
}
}
},
"tls": {
"certificates": {
"automate": [
"example.com"
]
}
}
}
} But to be clear, having a host matcher there is ineffectual, because
|
Oh, I'd agree - they both have the same functionality. That said, I do feel like :80, [name] is more readable in some cases (even if it's not adding any function), since it adds information about what the is default site (it's easy to see |
I'd just put a comment with |
Thanks for the easily reproducible report, I think I fixed it. |
While setting up a pihole on my local network, I noticed an odd behavior with the default site.
If I wrote the following in my caddy file, it would attempt to acquire a TLS certificate for
pi.hole
:However, if I broke the blocks into separate entries, like this:
Then it worked as expected (no tls certificate issued).
I'm currently running Caddy v2.3.0 on Ubuntu 20.04 (arm64).
The text was updated successfully, but these errors were encountered: