From 1fc00e938f8612ed97f9269c48bb620038de2300 Mon Sep 17 00:00:00 2001 From: Thomas Poignant Date: Tue, 8 Aug 2023 09:58:02 +0200 Subject: [PATCH] Adding cors middleware (#982) Signed-off-by: Thomas Poignant Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- cmd/relayproxy/api/server.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/relayproxy/api/server.go b/cmd/relayproxy/api/server.go index 41deef64e85..7feb050e3ee 100644 --- a/cmd/relayproxy/api/server.go +++ b/cmd/relayproxy/api/server.go @@ -51,6 +51,7 @@ func (s *Server) init() { prom.Use(s.echoInstance) s.echoInstance.Use(metrics.AddCustomMetricsMiddleware) s.echoInstance.Use(custommiddleware.ZapLogger(s.zapLog, s.config)) + s.echoInstance.Use(middleware.CORSWithConfig(middleware.DefaultCORSConfig)) s.echoInstance.Use(middleware.Recover()) s.echoInstance.Use(middleware.TimeoutWithConfig( middleware.TimeoutConfig{