Skip to content

Commit

Permalink
Feat: SecurityConfig AllowedOrigin 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Taekgil99 committed Dec 2, 2022
1 parent c1a7760 commit 985ea2d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,8 @@
public class SecurityConfig {

private final JwtTokenizer jwtTokenizer;

private final UserService userService;

private final UserRepository userRepository;

private final CustomOAuth2UserService customOAuth2UserService;
private final RefreshTokenRepository refreshTokenRepository;

Expand All @@ -46,6 +43,9 @@ public class SecurityConfig {
@Value("${address.front-s3}")
private String FRONT_REMOTE;

@Value("${address.front-https}")
private String FRONT_REMOTE_HTTPS;

@Value("${address.domain}")
private String DOMAIN;

Expand Down Expand Up @@ -95,6 +95,7 @@ CorsConfigurationSource corsConfigurationSource() {
CorsConfiguration configuration = new CorsConfiguration();
configuration.addAllowedOrigin(FRONT_LOCAL);
configuration.addAllowedOrigin(FRONT_REMOTE);
configuration.addAllowedOrigin(FRONT_REMOTE_HTTPS);
configuration.addAllowedOrigin(DOMAIN);
configuration.addAllowedOrigin(LOCAL);
configuration.addAllowedMethod("*");
Expand Down
1 change: 1 addition & 0 deletions backend/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ address:
domain: ${/config/cloud-parameter-store/domain-address}
front-local: ${/config/cloud-parameter-store/front-local}
front-s3: ${/config/cloud-parameter-store/front-s3}
front-https: ${/config/cloud-parameter-store/front-https}
### JWT ###
jwt:
access-token-expiration-time: ${/config/cloud-parameter-store/atk-exp}
Expand Down

0 comments on commit 985ea2d

Please sign in to comment.