From c03e64bee0bcdae0b007dd58a990b86057c0a057 Mon Sep 17 00:00:00 2001 From: Serhat Yenican Date: Mon, 27 May 2024 13:30:01 +0200 Subject: [PATCH] SLCORE-818 Allow baggage and sentry-trace headers to avoid cors errors --- .../sonarsource/sonarlint/core/embedded/server/CorsFilter.java | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/core/src/main/java/org/sonarsource/sonarlint/core/embedded/server/CorsFilter.java b/backend/core/src/main/java/org/sonarsource/sonarlint/core/embedded/server/CorsFilter.java index 78b6462736..682a76503e 100644 --- a/backend/core/src/main/java/org/sonarsource/sonarlint/core/embedded/server/CorsFilter.java +++ b/backend/core/src/main/java/org/sonarsource/sonarlint/core/embedded/server/CorsFilter.java @@ -44,6 +44,7 @@ public void handle(ClassicHttpRequest request, HttpFilterChain.ResponseTrigger r } response.addHeader("Access-Control-Allow-Methods", "GET, POST, OPTIONS"); response.addHeader("Access-Control-Allow-Private-Network", true); + response.addHeader("Access-Control-Allow-Headers", "baggage, sentry-trace"); responseTrigger.submitResponse(response); } else { chain.proceed(request, new HttpFilterChain.ResponseTrigger() {