Skip to content

Commit a3d939a

Browse files
committed
optimize
1 parent 7b2a020 commit a3d939a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ dev=>http://192.168.8.6:8888
1010
dev.com/test/product/list => http://192.168.8.8:8080/product/list
1111
dev.com/dev/order/list => http://192.168.8.6:8888/order/list
1212
13-
注意:dev.com机器能访问 IP 192.168.8.8
13+
注意:
14+
1.每行为一个映射
15+
2.dev.com机器能访问 IP 192.168.8.8
1416
```
1517

1618
# 使用方法

proxy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func (p *proxy) admin(w http.ResponseWriter, r *http.Request) {
4747
newData = service + "=>" + newUrl
4848
}
4949
w.Header().Set("Content-Type", "text/html;charset=utf-8")
50-
w.Write([]byte("<form method=\"POST\"><center><textarea autofocus name=\"data\" rows=\"30\" cols=\"100\">" + newData + "</textarea><br><input type=\"submit\" value=\"提交\"></center></form>"))
50+
w.Write([]byte("<form method=\"POST\"><center><textarea placeholder=\"test=>http://192.168.8.8:8080\r\n效果:\r\n" + GetURL(r) + "/test/product/list => http://192.168.8.8:8080/product/list\" autofocus name=\"data\" rows=\"30\" cols=\"100\">" + newData + "</textarea><br><input type=\"submit\" value=\"提交\"></center></form>"))
5151
}
5252

5353
func (p *proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) {

0 commit comments

Comments
 (0)