Correction of security configuration.
This commit is contained in:
@@ -47,15 +47,15 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
|
||||
"/api/posts/myPosts"
|
||||
).authenticated()
|
||||
.antMatchers(
|
||||
HttpMethod.GET,
|
||||
"/api/categories",
|
||||
"/api/images",
|
||||
"/api/posts",
|
||||
"/api/categories/**",
|
||||
"/api/images/**",
|
||||
"/api/posts/**"
|
||||
HttpMethod.GET,
|
||||
"/api/categories",
|
||||
"/api/images",
|
||||
"/api/posts",
|
||||
"/api/categories/**",
|
||||
"/api/images/**",
|
||||
"/api/posts/**"
|
||||
).permitAll()
|
||||
.anyRequest().authenticated()
|
||||
.anyRequest().permitAll()
|
||||
.and()
|
||||
// Allow to avoid login form at authentication failure from Angular app
|
||||
.exceptionHandling().authenticationEntryPoint(authenticationEntryPoint)
|
||||
|
||||
Reference in New Issue
Block a user