mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-16 05:36:36 +08:00
优化交互
This commit is contained in:
@@ -68,7 +68,7 @@ func (this *AddPopupAction) RunPost(params struct {
|
||||
addr := params.Addr
|
||||
|
||||
// 是否是完整的地址
|
||||
if params.Protocol == "http" || params.Protocol == "https" {
|
||||
if (params.Protocol == "http" || params.Protocol == "https") && regexp.MustCompile(`^(http|https)://`).MatchString(addr) {
|
||||
u, err := url.Parse(addr)
|
||||
if err == nil {
|
||||
addr = u.Host
|
||||
|
||||
@@ -122,7 +122,7 @@ func (this *UpdatePopupAction) RunPost(params struct {
|
||||
addr := params.Addr
|
||||
|
||||
// 是否是完整的地址
|
||||
if params.Protocol == "http" || params.Protocol == "https" {
|
||||
if (params.Protocol == "http" || params.Protocol == "https") && regexp.MustCompile(`^(http|https)://`).MatchString(addr) {
|
||||
u, err := url.Parse(addr)
|
||||
if err == nil {
|
||||
addr = u.Host
|
||||
|
||||
Reference in New Issue
Block a user