mirror of
https://github.com/lukaszraczylo/graphql-monitoring-proxy.git
synced 2026-10-21 06:37:21 +00:00
Reuse http client.
This commit is contained in:
@@ -40,7 +40,7 @@ func proxyTheRequest(c *fiber.Ctx) error {
|
|||||||
c.Request().Header.Del(fiber.HeaderAcceptEncoding)
|
c.Request().Header.Del(fiber.HeaderAcceptEncoding)
|
||||||
|
|
||||||
cfg.Logger.Debug("Proxying the request", map[string]interface{}{"path": c.Path(), "body": string(c.Request().Body()), "headers": c.GetReqHeaders(), "request_uuid": c.Locals("request_uuid")})
|
cfg.Logger.Debug("Proxying the request", map[string]interface{}{"path": c.Path(), "body": string(c.Request().Body()), "headers": c.GetReqHeaders(), "request_uuid": c.Locals("request_uuid")})
|
||||||
err := proxy.DoRedirects(c, cfg.Server.HostGraphQL+c.Path(), 3)
|
err := proxy.DoRedirects(c, cfg.Server.HostGraphQL+c.Path(), 3, cfg.Client.FastProxyClient)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
cfg.Logger.Error("Can't proxy the request", map[string]interface{}{"error": err.Error()})
|
cfg.Logger.Error("Can't proxy the request", map[string]interface{}{"error": err.Error()})
|
||||||
cfg.Monitoring.Increment(libpack_monitoring.MetricsFailed, nil)
|
cfg.Monitoring.Increment(libpack_monitoring.MetricsFailed, nil)
|
||||||
|
|||||||
Reference in New Issue
Block a user