前端页面
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"strconv"
|
||||
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/httpdns/policies"
|
||||
"github.com/iwind/TeaGo/maps"
|
||||
)
|
||||
|
||||
@@ -14,10 +15,11 @@ type TestAction struct {
|
||||
}
|
||||
|
||||
func (this *TestAction) RunPost(params struct {
|
||||
AppId string
|
||||
Domain string
|
||||
ClientIp string
|
||||
Qtype string
|
||||
AppId string
|
||||
ClusterId int64
|
||||
Domain string
|
||||
ClientIp string
|
||||
Qtype string
|
||||
}) {
|
||||
if len(params.ClientIp) == 0 {
|
||||
params.ClientIp = "203.0.113.100"
|
||||
@@ -40,7 +42,11 @@ func (this *TestAction) RunPost(params struct {
|
||||
query.Set("dn", params.Domain)
|
||||
query.Set("cip", params.ClientIp)
|
||||
query.Set("qtype", params.Qtype)
|
||||
requestURL := "https://api.httpdns.example.com/resolve?" + query.Encode()
|
||||
clusterServiceDomain := policies.LoadClusterGatewayByID(params.ClusterId)
|
||||
if len(clusterServiceDomain) == 0 {
|
||||
clusterServiceDomain = "gw.httpdns.example.com"
|
||||
}
|
||||
requestURL := "https://" + clusterServiceDomain + "/resolve?" + query.Encode()
|
||||
|
||||
this.Data["result"] = maps.Map{
|
||||
"code": 0,
|
||||
|
||||
Reference in New Issue
Block a user