Skip to content

Commit

Permalink
Merge pull request #248 from depromeet/dev
Browse files Browse the repository at this point in the history
Dev -> Prod
  • Loading branch information
minsoozz authored Jun 29, 2022
2 parents f257dd6 + 1083a89 commit 085cdeb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/main/java/com/depromeet/sulsul/config/SecurityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Override
public void configure(WebSecurity web) throws Exception {
web.ignoring().antMatchers("/h2-console/**",
"/v3/api-docs", "/configuration/ui",
"/v3/api-docs", "/configuration/ui",
"/swagger-resources", "/configuration/security",
"/swagger-ui.html", "/webjars/**","/swagger/**");
"/swagger-ui.html", "/webjars/**", "/swagger/**");
}

@Override
Expand All @@ -47,9 +47,9 @@ protected void configure(HttpSecurity http) throws Exception {
.sessionManagement().sessionCreationPolicy(STATELESS)
.and()
.authorizeHttpRequests()
.antMatchers("/swagger-resources/**","/swagger-ui/**").permitAll()
.antMatchers( "/login/oauth2/code/**","/api/v1/token/**").permitAll()
.antMatchers( "/oauth2/**").permitAll()
.antMatchers("/swagger-resources/**", "/swagger-ui/**").permitAll()
.antMatchers("/api/v1/token/**", "/login/oauth2/code/**").permitAll()
.antMatchers("/oauth2/**").permitAll()
.antMatchers("/guest/**").permitAll()
.anyRequest().authenticated()
.and()
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/com/depromeet/sulsul/config/WebConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(authInterceptor())
.order(1)
.addPathPatterns("/api/**")
.excludePathPatterns("/oauth2/authorization/**", "/guest/**");
.excludePathPatterns("/oauth2/authorization/**", "/guest/**", "/api/v1/token/**");
}

@Bean
Expand All @@ -46,7 +46,8 @@ public void addFormatters(FormatterRegistry registry) {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**") // CORS ๋ฅผ ์ ์šฉํ•  URL ํŒจํ„ด
.allowedOrigins("http://localhost:3000", "http://localhost", "https://beerair.kr") // ์ž์› ๊ณต์œ ๋ฅผ ํ—ˆ๋ฝํ•  Origin ์ง€์ •; ๋ชจ๋“  Origin ํ—ˆ๋ฝ
.allowedOrigins("http://localhost:3000", "http://localhost",
"https://beerair.kr") // ์ž์› ๊ณต์œ ๋ฅผ ํ—ˆ๋ฝํ•  Origin ์ง€์ •; ๋ชจ๋“  Origin ํ—ˆ๋ฝ
.allowedMethods( // ํ—ˆ์šฉํ•  HTTP method ์ง€์ •
HttpMethod.GET.name(),
HttpMethod.HEAD.name(),
Expand Down

0 comments on commit 085cdeb

Please sign in to comment.