mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-20 16:23:53 +01:00
fix wrong url passed
This commit is contained in:
BIN
bin/go-proxy
BIN
bin/go-proxy
Binary file not shown.
@@ -49,11 +49,11 @@ func NewHTTPRoute(config *ProxyConfig) (*HTTPRoute, error) {
|
||||
PathMode: config.PathMode,
|
||||
}
|
||||
|
||||
director := proxy.Director
|
||||
proxy.Director = nil
|
||||
|
||||
initRewrite := func(pr *httputil.ProxyRequest) {
|
||||
pr.SetURL(url)
|
||||
pr.SetXForwarded()
|
||||
director(pr.Out)
|
||||
}
|
||||
rewrite := initRewrite
|
||||
|
||||
@@ -78,7 +78,7 @@ func NewHTTPRoute(config *ProxyConfig) (*HTTPRoute, error) {
|
||||
}
|
||||
// disable cache
|
||||
r.Header.Set("Cache-Control", "no-store")
|
||||
|
||||
|
||||
var err error = nil
|
||||
switch {
|
||||
case strings.HasPrefix(contentType[0], "text/html"):
|
||||
|
||||
Reference in New Issue
Block a user