-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cors allow origin 을 yml에서 읽어오도록 변경 #619
Conversation
@DefaultValue(value = "") String[] allowedOrigins, | ||
@DefaultValue(value = "") String[] allowedOriginsPatterns |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yml 에 값이 없을 경우, NPE 예방을 위해 기본값 설정해놨습니다~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
혹시 프론트와 localhost 통신을 통한 테스트가 진행되었나요?
정상 동작하는지만 확인됐다면 바로 approve 하겠습니다!
고생하셨습니다 몰리
로직 자체는 변경이 없고 값을 잘 가져오는지 체크만 하면 된다고 생각해요 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
다음의 테스트 추가와 파일 수정을 하면 좋겠어요~
@SpringBootTest
public class PropertiesScanTest {
@Autowired
private CorsProperties corsProperties;
@Test
void scanConfigurationProperties() {
assertThat(corsProperties.getAllowedOrigins()).isEqualTo(new String[]{"http://localhost:3000"});
assertThat(corsProperties.getAllowedOriginsPatterns()).isEqualTo(new String[]{""});
}
}
# `test/resource/application-local.yml`
spring:
output:
ansi:
enabled: always
cors:
allowed-origins: http://localhost:3000
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GOOD 몰리 ~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다 몰리👍👍👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
⚡️ 관련 이슈
close #615
📍주요 변경 사항
🎸기타