Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR drops the
PUBLIC_URL
environment variable andpublic
option in webpack config in favor ofallowedHosts
option in webpack.기존에
PUBLIC_URL
환경변수의 입력이 필요했던 이유는 webpack-dev-server에서 host checking이 필요했기 때문입니다.webpack-dev-server에서 host checking은 이 repo를 원격 서버에서 실행시킬 때 일종의 보안설정입니다.
disableHostCheck
를 이용해 host checking을 아예 하지 않을 수도 있지만 개발 모드라도 credential들이 접근 가능할 수 있기 때문에 이와 같은 설정이 있었습니다.webpack-dev-server disableHostCheck 보안 관련 이슈
그러나 개발환경을 설정할 때마다 이를 입력하는 것이 번거롭기에 사실상 사용하는 두 개의 도메인,
.sparcs.org
와localhost
를allowedHosts
로 미리 등록해 두었습니다. 이와 동시에webpack.config.js
에서는.env
파일을 읽어올 필요가 없어졌기에dotenv
디펜던시를 제거하였습니다.