From 59ba94f6b73eacdac1eafd9f6db6340ea48a1ce9 Mon Sep 17 00:00:00 2001 From: Rainnny7 Date: Thu, 19 Sep 2024 00:29:39 -0400 Subject: [PATCH] okay pls yes pls pls --- src/main/java/cc/pulseapp/api/PulseAPI.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/cc/pulseapp/api/PulseAPI.java b/src/main/java/cc/pulseapp/api/PulseAPI.java index e591877..693fe48 100644 --- a/src/main/java/cc/pulseapp/api/PulseAPI.java +++ b/src/main/java/cc/pulseapp/api/PulseAPI.java @@ -50,10 +50,14 @@ public class PulseAPI { @Override public void addCorsMappings(@NonNull CorsRegistry registry) { // Allow all origins to access the API +// registry.addMapping("/**") +// .allowedMethods(Arrays.stream(HttpMethod.values()).map(HttpMethod::name).toArray(String[]::new)) // Allow all methods +// .allowedHeaders("*") +// .allowCredentials(true); registry.addMapping("/**") - .allowedMethods(Arrays.stream(HttpMethod.values()).map(HttpMethod::name).toArray(String[]::new)) // Allow all methods - .allowedHeaders("*") - .allowCredentials(true); + .allowedOrigins("*") // Allow all origins + .allowedMethods("*") // Allow all methods + .allowedHeaders("*"); // Allow all headers } }; }