-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Fix wildcard match to ACME domains in cluster mode #3080
Conversation
@oldmantaiter could you explain more in details why you added those lines in if strings.HasPrefix(domain, "*.") {
selector := "^" + strings.Replace(domain, "*.", "[^\\.]*\\.", -1) + "$"
if domainCheck, _ := regexp.MatchString(selector, domainToFind); domainCheck {
return domainsCertificate, true
}
} |
@emilevauge for sure. I was testing the new ACMEv2 merge and created a certificate for (as an example) |
@emilevauge This code snippet has been repeated in the acme package 3x already, and in |
@dtomcej I noticed the same, I can combine if that is easier |
I am agree with @dtomcej . I guess we can transform the list of Then, we can use acme.searchProvidedCertificateForDomains method instead of copy/paste the regexp matching. @oldmantaiter Do you think you can do it? Or do you need some help? |
Many thanks for your PR. |
4f2bfb5
to
2bd2936
Compare
@nmengin Thanks. There is one more place I saw this pattern matching code ( |
@oldmantaiter I saw it too and I am currently analyzing a solution to integrate all of them. I think it will be in an other PR. Many thanks for your feedback 👍 |
d2c95e7
to
91ed6f9
Compare
- Allows matching of hosts like `x.traefik.wtf` to ACME wildcard certs `*.traefik.wtf`
91ed6f9
to
744b765
Compare
744b765
to
dbadcb9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
dbadcb9
to
a6515f8
Compare
a6515f8
to
3668921
Compare
What does this PR do?
x.traefik.wtf
to ACME wildcardcerts
*.traefik.wtf
Motivation
More
Additional Notes