1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-03-13 17:24:44 +08:00

fix: 解决中文域名创建 PHP 类型网站失败的问题 (#4915)

This commit is contained in:
zhengkunwang 2024-05-08 14:34:23 +08:00 committed by GitHub
parent 75c23271df
commit bddb488baf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -296,7 +296,7 @@ func (w WebsiteService) CreateWebsite(create request.WebsiteCreate) (err error)
install *model.AppInstall
)
reg, _ := regexp.Compile(`[^a-z0-9_-]+`)
req.Name = reg.ReplaceAllString(strings.ToLower(create.PrimaryDomain), "")
req.Name = reg.ReplaceAllString(strings.ToLower(alias), "")
req.AppDetailId = create.AppInstall.AppDetailId
req.Params = create.AppInstall.Params
req.Params["IMAGE_NAME"] = runtime.Image