-
Notifications
You must be signed in to change notification settings - Fork 0
Hot fix/ver1 #43
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
Hot fix/ver1 #43
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
a0e2be7
Merge pull request #41 from choubung/dev
choubung d6c19cf
Merge pull request #42 from choubung/dev
choubung e73b22b
chore: 포트 지정 삭제
choubung 9e978de
Update application.properties
choubung 07ac855
chore: dockerfile 포트 변경
choubung 2fb3eea
chore: application.propertise 포트 변경
choubung 3673444
chore: cd 고급 옵션 flags로 옮기기
choubung dd53f06
fix: csrf 오류 수정
choubung 6adbed3
test(integration): .secure(true)를 추가하여 HTTPS 리디렉션 오류 수정
choubung 0a32c05
refactor(SecurityConfig): 배포와 개발 환경 bean 분리
choubung 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
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
20 changes: 20 additions & 0 deletions
20
src/main/java/com/precourse/openMission/web/GlobalModelAdvice.java
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,20 @@ | ||
| package com.precourse.openMission.web; | ||
|
|
||
| import jakarta.servlet.http.HttpServletRequest; | ||
| import org.springframework.security.web.csrf.CsrfToken; | ||
| import org.springframework.web.bind.annotation.ControllerAdvice; | ||
| import org.springframework.web.bind.annotation.ModelAttribute; | ||
| import org.springframework.stereotype.Controller; | ||
|
|
||
| /** | ||
| * 모든 컨트롤러(@Controller)의 Model에 | ||
| * 공통 속성(Attribute)을 추가하는 클래스 | ||
| */ | ||
| @ControllerAdvice(annotations = Controller.class) | ||
| public class GlobalModelAdvice { | ||
| @ModelAttribute("_csrf") | ||
| public CsrfToken csrfToken(HttpServletRequest request) { | ||
| // Spring Security가 이미 request에 저장해 둔 _csrf 토큰을 꺼내서 Model에 담아줌 | ||
| return (CsrfToken) request.getAttribute(CsrfToken.class.getName()); | ||
| } | ||
| } |
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
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
Oops, something went wrong.
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.
🧩 Analysis chain
deploy-cloudrun 액션 v2와 flags 입력 호환성 검증
Cloud Run 배포 설정을 flags 블록으로 통합하셨습니다.
google-github-actions/deploy-cloudrun@v2액션이 이러한 flags 형식을 지원하는지 확인이 필요합니다.다음 방법으로 액션 호환성을 확인해주세요:
또한 GCP_SQL_CONNECTION_NAME 시크릿이 GitHub 저장소의 Secrets에 올바르게 설정되어 있는지 확인해주세요.
🌐 Web query:
💡 Result:
The
flagsinput (optional) accepts a space-separated list of additional gcloud flags which the action appends to the underlying gcloud command:gcloud run deploy; for jobs it is passed togcloud jobs deploy.Example:
with:
flags: '--add-cloudsql-instances=... "--args=-X=123"'
Sources: GitHub action README. [1][2]
Sources
[1] google-github-actions/deploy-cloudrun README (flags input).
[2] GitHub Marketplace — Deploy to Cloud Run (action inputs/flags).
YAML 플래그 형식 수정 필요
웹 검색 결과에 따르면
google-github-actions/deploy-cloudrun@v2의flags입력은 "space-separated list of additional gcloud flags"여야 합니다.현재 코드의 문제점:
YAML 멀티라인 문자열(
|)은 개행 문자로 구분된 형식을 생성하지만, gcloud 명령은 공백으로 구분된 플래그를 기대합니다. 이는 배포 실패 또는 플래그 무시로 이어질 수 있습니다.수정 방법:
단일 라인으로 공백으로 구분하여 정의하거나, 여러 줄이 필요한 경우
>폴드 연산자를 사용하여 개행을 공백으로 변환하세요.🤖 Prompt for AI Agents