-
Notifications
You must be signed in to change notification settings - Fork 0
chore: Firebase 배포 설정 개선 (#53) #55
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # 개발 서버 (배포된 개발 환경) | ||
| VITE_API_URL=https://dev-api.ttorang.com | ||
| VITE_APP_TITLE=또랑 (개발) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,20 @@ | ||
| # =========================================== | ||
| # 환경변수 템플릿 | ||
| # 이 파일을 복사해서 .env.local 파일을 만드세요 | ||
| # =========================================== | ||
|
|
||
| # API | ||
| # API 서버 URL | ||
| # - 개발: https://dev-api.ttorang.com | ||
| # - 프로덕션: https://api.ttorang.com | ||
| VITE_API_URL= | ||
|
|
||
| # App | ||
| # 앱 타이틀 | ||
| VITE_APP_TITLE=또랑 | ||
|
|
||
| # =========================================== | ||
| # 시크릿 키 (반드시 .env.local에만 설정하세요) | ||
| # =========================================== | ||
|
|
||
| # 카카오 JavaScript 키 (공유 기능용) | ||
| # https://developers.kakao.com 에서 발급 | ||
| VITE_KAKAO_JS_KEY= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # 프로덕션 서버 | ||
| VITE_API_URL=https://api.ttorang.com | ||
| VITE_APP_TITLE=또랑 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,53 @@ | ||
| { | ||
| "hosting": { | ||
| "public": "dist", | ||
| "ignore": [ | ||
| "firebase.json", | ||
| "**/.*", | ||
| "**/node_modules/**" | ||
| ], | ||
| "ignore": ["firebase.json", "**/.*", "**/node_modules/**"], | ||
| "rewrites": [ | ||
| { | ||
| "source": "**", | ||
| "destination": "/index.html" | ||
| } | ||
| ], | ||
| "headers": [ | ||
| { | ||
| "source": "**/*.@(js|css|jpg|jpeg|png|gif|webp|svg|ico|woff|woff2)", | ||
| "headers": [ | ||
| { | ||
| "key": "Cache-Control", | ||
| "value": "public, max-age=31536000, immutable" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "source": "index.html", | ||
| "headers": [ | ||
| { | ||
| "key": "Cache-Control", | ||
| "value": "no-cache, no-store, must-revalidate" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "source": "**", | ||
| "headers": [ | ||
| { | ||
| "key": "Content-Security-Policy", | ||
| "value": "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; font-src 'self' data:; connect-src 'self' https://dev-api.ttorang.com https://api.ttorang.com https://developers.kakao.com; frame-ancestors 'none'" | ||
| }, | ||
| { | ||
| "key": "X-Frame-Options", | ||
| "value": "DENY" | ||
| }, | ||
| { | ||
| "key": "X-Content-Type-Options", | ||
| "value": "nosniff" | ||
| }, | ||
| { | ||
| "key": "Referrer-Policy", | ||
| "value": "strict-origin-when-cross-origin" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| } | ||
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.
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.
자바스크립트/CSS 파일과 이미지/폰트 파일에 대한 캐싱 규칙이 동일한
Cache-Control헤더를 사용하고 있습니다. 이 두 규칙을 하나로 병합하면firebase.json설정 파일을 더 간결하게 유지할 수 있습니다.