Skip to content

Commit ee33057

Browse files
Fix domain validation
1 parent ea2ce22 commit ee33057

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/bundle/surveys.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,16 @@ func domainSurvey(def string, item *api.ConfigurationItem, proj *manifest.Projec
6767
return nil
6868
}
6969

70-
if context.HasDomain(res) {
70+
if context.HasDomain(res) && res != def {
7171
return fmt.Errorf("domain %s has already been used elsewhere in this project, please chose another", res)
7272
}
7373

7474
if proj.Network != nil && !strings.HasSuffix(res, proj.Network.Subdomain) {
7575
return fmt.Errorf("domain must end with %s", proj.Network.Subdomain)
7676
}
77+
7778
// check single level deep
78-
if err := utils.ValidateSingleLevelDeep(res, proj.Network.Subdomain); err != nil {
79+
if err := utils.ValidateSingleLevelDeep(res, proj.Network.Subdomain); err != nil && proj.Network.PluralDns {
7980
return err
8081
}
8182

0 commit comments

Comments
 (0)