Skip to content

Commit

Permalink
Update PublicCorsConfig.java
Browse files Browse the repository at this point in the history
  • Loading branch information
oriolcanades authored Dec 4, 2024
1 parent 2817f5e commit 104818f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/main/java/es/in2/verifier/security/PublicCorsConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,16 @@ public class PublicCorsConfig {
@Bean
public CorsConfigurationSource publicCorsConfigurationSource() {
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();

// Configure public endpoints
CorsConfiguration publicConfig = new CorsConfiguration();
publicConfig.setAllowedOriginPatterns(List.of("*"));
publicConfig.setAllowedMethods(List.of("GET", "POST"));
publicConfig.setAllowedHeaders(List.of("Content-Type"));
publicConfig.setAllowCredentials(false);

source.registerCorsConfiguration("/health", publicConfig);
source.registerCorsConfiguration("/oid4vp/auth-request/**", publicConfig);
source.registerCorsConfiguration("/oid4vp/auth-response", publicConfig);

return source;
}

}

0 comments on commit 104818f

Please sign in to comment.