From 64ba43d1cdd56a4a53a72858c3f11ec127e19089 Mon Sep 17 00:00:00 2001 From: Basilio Bogado <541149+basiliskus@users.noreply.github.com> Date: Thu, 26 Dec 2024 10:14:39 -0800 Subject: [PATCH] Trial and error --- .../hhs/cdc/trustedintermediary/external/javalin/App.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/gov/hhs/cdc/trustedintermediary/external/javalin/App.java b/app/src/main/java/gov/hhs/cdc/trustedintermediary/external/javalin/App.java index 505ea8fed..234c6780a 100644 --- a/app/src/main/java/gov/hhs/cdc/trustedintermediary/external/javalin/App.java +++ b/app/src/main/java/gov/hhs/cdc/trustedintermediary/external/javalin/App.java @@ -33,7 +33,6 @@ import gov.hhs.cdc.trustedintermediary.wrappers.database.DatabaseCredentialsProvider; import gov.hhs.cdc.trustedintermediary.wrappers.formatter.Formatter; import io.javalin.Javalin; -import io.javalin.plugin.bundled.CorsPluginConfig; import java.util.Set; /** Creates the starting point of our API. Handles the registration of the domains. */ @@ -50,7 +49,11 @@ public static void main(String[] args) { config.http.maxRequestSize = MAX_REQUEST_SIZE; config.bundledPlugins.enableCors( cors -> { - cors.addRule(CorsPluginConfig.CorsRule::anyHost); + cors.addRule( + it -> { + it.allowCredentials = true; + it.anyHost(); + }); }); }) .start(PORT);