Skip to content

Commit 0cc2b03

Browse files
Allow Wildcard domain to be without subdomain (#20)
* Allow wildcard domain to be without subdomain
1 parent 207f0ad commit 0cc2b03

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

app/controller/server/update.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"strings"
77

88
"github.com/cloudness-io/cloudness/app/usererror"
9+
"github.com/cloudness-io/cloudness/helpers"
910
"github.com/cloudness-io/cloudness/types"
1011
"github.com/cloudness-io/cloudness/types/check"
1112
"github.com/cloudness-io/cloudness/types/enum"
@@ -103,6 +104,10 @@ func (c *Controller) UpdateNetwork(ctx context.Context, in *ServerNetworkUpdateM
103104
return nil, err
104105
}
105106

107+
if strings.HasPrefix(hostname, "https://") {
108+
_, _, hostname = helpers.ParseFQDN(hostname)
109+
}
110+
106111
if err := c.proxySvc.ValidateToken(ctx, in.DNSProvider, in.DNSProviderAuth, hostname); err != nil {
107112
return nil, err
108113
}

0 commit comments

Comments
 (0)