Skip to content

Commit

Permalink
Trial and error
Browse files Browse the repository at this point in the history
  • Loading branch information
basiliskus committed Dec 26, 2024
1 parent 3dd76c6 commit 64ba43d
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand All @@ -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);
Expand Down

0 comments on commit 64ba43d

Please sign in to comment.