feat: 网站名称支持带端口 (#4446)

Refs https://github.com/1Panel-dev/1Panel/issues/3726
This commit is contained in:
zhengkunwang 2024-04-09 17:32:10 +08:00 committed by GitHub
parent 1e2c85e771
commit 437d6eb0fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -179,8 +179,6 @@ func (w WebsiteService) GetWebsites() ([]response.WebsiteDTO, error) {
}
func (w WebsiteService) CreateWebsite(create request.WebsiteCreate) (err error) {
primaryDomainArray := strings.Split(create.PrimaryDomain, ":")
primaryDomain := primaryDomainArray[0]
alias := create.Alias
if common.ContainsChinese(alias) {
alias, err = common.PunycodeEncode(alias)
@ -214,7 +212,7 @@ func (w WebsiteService) CreateWebsite(create request.WebsiteCreate) (err error)
defaultDate, _ := time.Parse(constant.DateLayout, constant.DefaultDate)
website := &model.Website{
PrimaryDomain: primaryDomain,
PrimaryDomain: create.PrimaryDomain,
Type: create.Type,
Alias: alias,
Remark: create.Remark,