mirror of
https://github.com/openfaas/faasd.git
synced 2025-06-09 16:36:47 +00:00
Don't follow redirects
Required for functioning proxy Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
parent
306313ed9a
commit
48237e0b3c
@ -27,6 +27,10 @@ type Proxy struct {
|
|||||||
func (p *Proxy) Start() error {
|
func (p *Proxy) Start() error {
|
||||||
tcp := 8080
|
tcp := 8080
|
||||||
|
|
||||||
|
http.DefaultClient.CheckRedirect = func(req *http.Request, via []*http.Request) error {
|
||||||
|
return http.ErrUseLastResponse
|
||||||
|
}
|
||||||
|
|
||||||
time.Sleep(3 * time.Second)
|
time.Sleep(3 * time.Second)
|
||||||
log.Printf("Starting faasd proxy on %d\n", tcp)
|
log.Printf("Starting faasd proxy on %d\n", tcp)
|
||||||
data := struct{ host string }{
|
data := struct{ host string }{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user