mirror of
https://github.com/lukaszraczylo/graphql-monitoring-proxy.git
synced 2026-10-20 06:28:13 +00:00
fix(proxy): handle lowercase Location header (#20)
When the upstream server returns a redirect HTTP response code but its "Location" header is in lowercase, the proxy will retry the request 5 times and eventually fail with an "missing Location header for http redirect" error. Since the HTTP spec says header names are case-insensitive, we should handle this case properly. Adjust fasthttp options accordingly Ref: https://github.com/valyala/fasthttp/issues/1361
This commit is contained in:
@@ -30,7 +30,7 @@ func createFasthttpClient(timeout int) *fasthttp.Client {
|
|||||||
WriteTimeout: time.Duration(timeout) * time.Second,
|
WriteTimeout: time.Duration(timeout) * time.Second,
|
||||||
MaxIdleConnDuration: time.Duration(timeout) * time.Second,
|
MaxIdleConnDuration: time.Duration(timeout) * time.Second,
|
||||||
MaxConnDuration: time.Duration(timeout) * time.Second,
|
MaxConnDuration: time.Duration(timeout) * time.Second,
|
||||||
DisableHeaderNamesNormalizing: true,
|
DisableHeaderNamesNormalizing: false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user