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 5191771 commit b73ee1dCopy full SHA for b73ee1d
1 file changed
examples/redirect-https/main.go
@@ -16,10 +16,11 @@ func main() {
16
proxy := goproxy.NewProxyHttpServer()
17
proxy.OnRequest().HandleConnect(goproxy.AlwaysMitm)
18
proxy.OnRequest().DoFunc(func(req *http.Request, ctx *goproxy.ProxyCtx) (*http.Request, *http.Response) {
19
- if req.URL.Scheme == "https" {
20
- req.URL.Scheme = "http"
+ if req.URL.Scheme != "https" {
+ return req, nil
21
}
22
23
+ req.URL.Scheme = "http"
24
resp := &http.Response{
25
StatusCode: http.StatusSeeOther,
26
ProtoMajor: 1,
0 commit comments