Skip to content

Commit

Permalink
fix: prod 환경 Swagger 동작 (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
char-yb authored Aug 12, 2024
1 parent d2b280a commit 44a128d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti

@Bean
@Order(1)
@ConditionalOnProfile({DEV, LOCAL})
@ConditionalOnProfile({PROD, DEV, LOCAL})
public SecurityFilterChain swaggerFilterChain(HttpSecurity http) throws Exception {
defaultFilterChain(http);

http.securityMatcher(getSwaggerUrls()).httpBasic(withDefaults());

http.authorizeHttpRequests(
springEnvironmentUtil.isDevProfile()
(springEnvironmentUtil.isDevProfile() || springEnvironmentUtil.isProdProfile())
? authorize -> authorize.anyRequest().authenticated()
: authorize -> authorize.anyRequest().permitAll());

Expand Down

0 comments on commit 44a128d

Please sign in to comment.