Commit 60d1646b authored by gaoshiyao's avatar gaoshiyao

tls

parent a5522d16
...@@ -46,7 +46,9 @@ func Proxy(c *gin.Context) { ...@@ -46,7 +46,9 @@ func Proxy(c *gin.Context) {
c.JSON(200, res) c.JSON(200, res)
return return
} }
f, _ := forward.New(forward.PassHostHeader(true), forward.WebsocketTLSClientConfig(&tls.Config{InsecureSkipVerify: true}), forward.ResponseModifier(func(resp *http.Response) error { roundTripper := http.DefaultTransport.(*http.Transport)
roundTripper.TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
f, _ := forward.New(forward.PassHostHeader(true), forward.RoundTripper(roundTripper), forward.ResponseModifier(func(resp *http.Response) error {
//Resp = resp //Resp = resp
//判断是否超过调用次数是否可以调用 //判断是否超过调用次数是否可以调用
callflag, sensitiveflag, err := service.QueryCallsCount(proxyData) callflag, sensitiveflag, err := service.QueryCallsCount(proxyData)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment