Pass through upstream redirects

This commit is contained in:
Anders Pitman
2020-10-29 13:03:35 -06:00
parent 0f3482f836
commit 4f09c7ada1

View File

@@ -84,7 +84,12 @@ func Listen() {
webUiHandler := NewWebUiHandler(config, db, api, auth, tunMan)
httpClient := &http.Client{}
httpClient := &http.Client{
// Don't follow redirects
CheckRedirect: func(req *http.Request, via []*http.Request) error {
return http.ErrUseLastResponse
},
}
p := &BoringProxy{db, tunMan, httpClient}