#3 -- allow cors requests

This commit is contained in:
Anton Romanov 2022-04-20 08:36:29 +04:00
parent 4836aaa332
commit 00a4d75673

View File

@ -17,6 +17,9 @@ class ControllersConfiguration {
config.addAllowedHeader("*"); config.addAllowedHeader("*");
config.addAllowedMethod("GET"); config.addAllowedMethod("GET");
config.addAllowedMethod("POST"); config.addAllowedMethod("POST");
config.addAllowedMethod("PUT");
config.addAllowedMethod("PATCH");
config.addAllowedMethod("OPTIONAL");
config.addAllowedMethod("DELETE"); config.addAllowedMethod("DELETE");
source.registerCorsConfiguration("/**", config); source.registerCorsConfiguration("/**", config);
return new CorsFilter(source); return new CorsFilter(source);