Skip to content

Commit

Permalink
refactor : shareURL로 공유페이지 접속하는 url 수정 (Fastcampus-Final-Team3#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
miyounlee committed Oct 26, 2023
1 parent e4ad5a3 commit 571e04f
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions src/main/java/com/javajober/core/security/SecurityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,34 +19,34 @@ public class SecurityConfig {
private final CustomAuthenticationEntryPoint customAuthenticationEntryPoint;

public SecurityConfig(AuthenticationManagerConfig authenticationManagerConfig,
CustomAuthenticationEntryPoint customAuthenticationEntryPoint) {
CustomAuthenticationEntryPoint customAuthenticationEntryPoint) {
this.authenticationManagerConfig = authenticationManagerConfig;
this.customAuthenticationEntryPoint = customAuthenticationEntryPoint;
}

@Bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
return http
.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS) //세션 사용 x 설정
.and()
.formLogin().disable()
.csrf().disable()
.cors()
.and()
.apply(authenticationManagerConfig)
.and()
.httpBasic().disable()
.authorizeRequests()
.antMatchers("/api/members/login").permitAll()
.antMatchers("/api/members/signup").permitAll()
.antMatchers("/healthCheck").permitAll()
.antMatchers("/api/wall/shareURL/**").permitAll()
.anyRequest().authenticated()
.and()
.exceptionHandling()
.authenticationEntryPoint(customAuthenticationEntryPoint)
.and()
.build();
.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS) //세션 사용 x 설정
.and()
.formLogin().disable()
.csrf().disable()
.cors()
.and()
.apply(authenticationManagerConfig)
.and()
.httpBasic().disable()
.authorizeRequests()
.antMatchers("/api/members/login").permitAll()
.antMatchers("/api/members/signup").permitAll()
.antMatchers("/healthCheck").permitAll()
.antMatchers("/api/wall/{shareURL}").permitAll()
.anyRequest().authenticated()
.and()
.exceptionHandling()
.authenticationEntryPoint(customAuthenticationEntryPoint)
.and()
.build();
}

public CorsConfigurationSource corsConfigurationSource() {
Expand Down

0 comments on commit 571e04f

Please sign in to comment.