Skip to content

Commit

Permalink
chore: add frameOptions to SecurityConfig.
Browse files Browse the repository at this point in the history
  • Loading branch information
stritti committed Aug 12, 2023
1 parent b6a0036 commit b85983a
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/main/java/de/sybit/sygotchi/config/SecurityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,15 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti
http
.csrf().disable()
.cors().disable()
.authorizeHttpRequests()
.requestMatchers("/**")
.permitAll()
.anyRequest()
.authenticated()
.headers().frameOptions().sameOrigin().and()
.authorizeHttpRequests().requestMatchers("/**").permitAll()
.anyRequest().authenticated()
.and()
.sessionManagement()
.sessionCreationPolicy(SessionCreationPolicy.STATELESS)
.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)
.and()
.exceptionHandling().authenticationEntryPoint(unauthorizedHandler)
.and()
.authenticationProvider(authenticationProvider)
.addFilterBefore(jwtAuthFilter, UsernamePasswordAuthenticationFilter.class);
.authenticationProvider(authenticationProvider).addFilterBefore(jwtAuthFilter, UsernamePasswordAuthenticationFilter.class);

return http.build();
}
Expand Down

0 comments on commit b85983a

Please sign in to comment.