We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c8bd04 commit 69b7225Copy full SHA for 69b7225
proxy.go
@@ -27,7 +27,7 @@ func (p *proxy) admin(w http.ResponseWriter, r *http.Request) {
27
arr := strings.Split(data, "\r\n")
28
for _, item := range arr {
29
d := strings.Split(item, "=>")
30
- if len(d) < 2 {
+ if len(d) < 2 || d[0] == "admin" {
31
continue
32
}
33
_, err := url.Parse("http://" + d[1])
@@ -64,7 +64,7 @@ func (p *proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) {
64
w.Write([]byte("没有设置信息,请检查配置:" + GetURL(r) + "/admin"))
65
return
66
67
- target, err := url.Parse(p.table.Get(service))
+ target, err := url.Parse("http://" + p.table.Get(service))
68
if err != nil {
69
w.Write([]byte(err.Error()))
70
0 commit comments