Skip to content

Commit 69b7225

Browse files
committed
debug
1 parent 2c8bd04 commit 69b7225

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

proxy.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func (p *proxy) admin(w http.ResponseWriter, r *http.Request) {
2727
arr := strings.Split(data, "\r\n")
2828
for _, item := range arr {
2929
d := strings.Split(item, "=>")
30-
if len(d) < 2 {
30+
if len(d) < 2 || d[0] == "admin" {
3131
continue
3232
}
3333
_, err := url.Parse("http://" + d[1])
@@ -64,7 +64,7 @@ func (p *proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) {
6464
w.Write([]byte("没有设置信息,请检查配置:" + GetURL(r) + "/admin"))
6565
return
6666
}
67-
target, err := url.Parse(p.table.Get(service))
67+
target, err := url.Parse("http://" + p.table.Get(service))
6868
if err != nil {
6969
w.Write([]byte(err.Error()))
7070
return

0 commit comments

Comments
 (0)