Skip to content

Commit

Permalink
Don't follow redirects
Browse files Browse the repository at this point in the history
Required for functioning proxy

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
  • Loading branch information
alexellis committed Dec 29, 2019
1 parent 306313e commit 48237e0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ type Proxy struct {
func (p *Proxy) Start() error {
tcp := 8080

http.DefaultClient.CheckRedirect = func(req *http.Request, via []*http.Request) error {
return http.ErrUseLastResponse
}

time.Sleep(3 * time.Second)
log.Printf("Starting faasd proxy on %d\n", tcp)
data := struct{ host string }{
Expand Down

0 comments on commit 48237e0

Please sign in to comment.