diff options
author | Maxim Korolyov <mkorolyov@humans.net> | 2020-11-03 00:24:57 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-02 22:24:57 +0100 |
commit | d7752d2a7056486409472bda6b55d1fef03fa9c5 (patch) | |
tree | fa6fab7f0d911830580f731a53e84f2a6bb28a6c /fasthttpproxy | |
parent | Add Request.SetBodyRaw (diff) | |
download | fasthttp-d7752d2a7056486409472bda6b55d1fef03fa9c5.tar.gz fasthttp-d7752d2a7056486409472bda6b55d1fef03fa9c5.tar.bz2 fasthttp-d7752d2a7056486409472bda6b55d1fef03fa9c5.zip |
fixed default schema for for req url (#897)
Diffstat (limited to 'fasthttpproxy')
-rw-r--r-- | fasthttpproxy/proxy_env.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fasthttpproxy/proxy_env.go b/fasthttpproxy/proxy_env.go index 9d5fe98..34089ca 100644 --- a/fasthttpproxy/proxy_env.go +++ b/fasthttpproxy/proxy_env.go @@ -35,6 +35,7 @@ func FasthttpProxyHTTPDialer() fasthttp.DialFunc { const ( httpsScheme = "https" + httpScheme = "http" tlsPort = "443" ) @@ -52,7 +53,7 @@ func FasthttpProxyHTTPDialerTimeout(timeout time.Duration) fasthttp.DialFunc { return nil, fmt.Errorf("unexpected addr format: %w", err) } - reqURL := &url.URL{Host: addr, Scheme: httpsScheme} + reqURL := &url.URL{Host: addr, Scheme: httpScheme} if port == tlsPort { reqURL.Scheme = httpsScheme } |