feat: Replace HTTP01 by DNS01
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -44,21 +44,21 @@ func unlockDomain(domain string) {
|
||||
|
||||
func buildDomainList(domain, pagesDomain string) []string {
|
||||
// TODO: For wildcards, we MUST use DNS01
|
||||
/*if domain == pagesDomain || strings.HasSuffix(domain, pagesDomain) {
|
||||
if domain == pagesDomain || strings.HasSuffix(domain, pagesDomain) {
|
||||
return []string{
|
||||
pagesDomain,
|
||||
"*." + pagesDomain,
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
return []string{domain}
|
||||
}
|
||||
|
||||
func getDomainKey(domain, pagesDomain string) string {
|
||||
// TODO: For wildcards, we MUST use DNS01
|
||||
/*if domain == pagesDomain || strings.HasSuffix(domain, pagesDomain) {
|
||||
if domain == pagesDomain || strings.HasSuffix(domain, pagesDomain) {
|
||||
return "*." + pagesDomain
|
||||
}*/
|
||||
}
|
||||
|
||||
return domain
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package server
|
||||
|
||||
import "testing"
|
||||
|
||||
const (
|
||||
pagesDomain = "pages.local"
|
||||
pagesDomainWildcard = "*.pages.local"
|
||||
@@ -19,8 +21,7 @@ func equals(a, b []string) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// TODO: We can only do this once we can do DNS01 for wildcard certificates.
|
||||
/*func TestDomainListBare(t *testing.T) {
|
||||
func TestDomainListBare(t *testing.T) {
|
||||
expect := []string{pagesDomain, pagesDomainWildcard}
|
||||
res := buildDomainList(pagesDomain, pagesDomain)
|
||||
if !equals(res, expect) {
|
||||
@@ -63,4 +64,4 @@ func TestDomainKeyCNAME(t *testing.T) {
|
||||
if res != "testdomain.example" {
|
||||
t.Fatalf("%s != %s", res, "testdomain.example")
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user