From cb4019ead42b6bd0b56cce406e005d1516744708 Mon Sep 17 00:00:00 2001 From: DevDonut <41371020+DevDonut@users.noreply.github.com> Date: Sat, 16 Jan 2021 14:45:45 +0100 Subject: [PATCH] Allow Cross-Origin PUT Requests (#543) * Allow Cross-Origin PUT Requests * Allow all request methods for CORS --- .../ch/wisv/areafiftylan/security/SecurityConfiguration.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/ch/wisv/areafiftylan/security/SecurityConfiguration.java b/src/main/java/ch/wisv/areafiftylan/security/SecurityConfiguration.java index 305bc0fdd..ed4b95c18 100644 --- a/src/main/java/ch/wisv/areafiftylan/security/SecurityConfiguration.java +++ b/src/main/java/ch/wisv/areafiftylan/security/SecurityConfiguration.java @@ -123,7 +123,7 @@ public WebMvcConfigurer corsConfigurer() { return new WebMvcConfigurer() { @Override public void addCorsMappings(@Nonnull CorsRegistry registry) { - registry.addMapping("/**").exposedHeaders("X-Auth-Token"); + registry.addMapping("/**").exposedHeaders("X-Auth-Token").allowedMethods("*"); } }; }