Loading src/main/java/es/redmic/user/config/CorsConfiguration.java +1 −1 Original line number Diff line number Diff line Loading @@ -9,6 +9,6 @@ public class CorsConfiguration implements WebMvcConfigurer { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**"); registry.addMapping("/**").allowedMethods("GET", "PUT", "POST", "DELETE"); } } src/main/java/es/redmic/user/config/Oauth2SecurityConfiguration.java +1 −3 Original line number Diff line number Diff line Loading @@ -66,8 +66,7 @@ public class Oauth2SecurityConfiguration { public void configure(HttpSecurity http) throws Exception { // @formatter:off http.cors().disable().anonymous().and().authorizeRequests().antMatchers("/user/actuator/**").permitAll() .antMatchers(HttpMethod.OPTIONS, "/**").permitAll() http.cors().and().anonymous().and().authorizeRequests().antMatchers("/user/actuator/**").permitAll() .antMatchers(HttpMethod.GET, "/user/profile/").permitAll() .antMatchers(HttpMethod.GET, "/user/modules/openmodules/").permitAll() .antMatchers(HttpMethod.POST, "/user/register/**/").permitAll() Loading @@ -80,5 +79,4 @@ public class Oauth2SecurityConfiguration { "#oauth2.hasScope('read') or #oauth2.hasScope('write') and hasAnyRole('ROLE_ADMINISTRATOR', 'ROLE_OAG', 'ROLE_COLLABORATOR', 'ROLE_USER')"); } } } Loading
src/main/java/es/redmic/user/config/CorsConfiguration.java +1 −1 Original line number Diff line number Diff line Loading @@ -9,6 +9,6 @@ public class CorsConfiguration implements WebMvcConfigurer { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**"); registry.addMapping("/**").allowedMethods("GET", "PUT", "POST", "DELETE"); } }
src/main/java/es/redmic/user/config/Oauth2SecurityConfiguration.java +1 −3 Original line number Diff line number Diff line Loading @@ -66,8 +66,7 @@ public class Oauth2SecurityConfiguration { public void configure(HttpSecurity http) throws Exception { // @formatter:off http.cors().disable().anonymous().and().authorizeRequests().antMatchers("/user/actuator/**").permitAll() .antMatchers(HttpMethod.OPTIONS, "/**").permitAll() http.cors().and().anonymous().and().authorizeRequests().antMatchers("/user/actuator/**").permitAll() .antMatchers(HttpMethod.GET, "/user/profile/").permitAll() .antMatchers(HttpMethod.GET, "/user/modules/openmodules/").permitAll() .antMatchers(HttpMethod.POST, "/user/register/**/").permitAll() Loading @@ -80,5 +79,4 @@ public class Oauth2SecurityConfiguration { "#oauth2.hasScope('read') or #oauth2.hasScope('write') and hasAnyRole('ROLE_ADMINISTRATOR', 'ROLE_OAG', 'ROLE_COLLABORATOR', 'ROLE_USER')"); } } }