Skip to content

Commit 2f31ebe

Browse files
author
Pavan Jadda
committed
Add CORS config
1 parent f11d2aa commit 2f31ebe

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/main/java/com/pj/keycloak/security/SecurityConfig.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ protected void configure(HttpSecurity http) throws Exception
6262

6363
http.cors();
6464
}
65+
6566
//Cors filter to accept incoming requests
6667
@Bean
6768
CorsConfigurationSource corsConfigurationSource()
@@ -75,14 +76,4 @@ CorsConfigurationSource corsConfigurationSource()
7576
return source;
7677
}
7778

78-
/* public WebMvcConfigurer corsConfigurer()
79-
{
80-
return new WebMvcConfigurer() {
81-
@Override
82-
public void addCorsMappings(CorsRegistry registry)
83-
{
84-
registry.addMapping("/api/*").allowedOrigins("http://localhost:4200");
85-
}
86-
};
87-
}*/
8879
}

0 commit comments

Comments
 (0)