Skip to content

πŸ”§ μΉ΄μΉ΄μ˜€ν†‘ URL ν•˜λ“œμ½”λ”© μˆ˜μ • - #115

Merged
passionryu merged 1 commit into
devfrom
feat/URL
Jul 21, 2025
Merged

πŸ”§ μΉ΄μΉ΄μ˜€ν†‘ URL ν•˜λ“œμ½”λ”© μˆ˜μ •#115
passionryu merged 1 commit into
devfrom
feat/URL

Conversation

@moonjun1

@moonjun1 moonjun1 commented Jul 21, 2025

Copy link
Copy Markdown
Member

.env 파일
BASE_URL=https://api.likelionnews.click μΆ”κ°€

Summary by CodeRabbit

  • Chores
    • Kakao OAuth2 ν΄λΌμ΄μ–ΈνŠΈ λ¦¬λ””λ ‰μ…˜ URIκ°€ ν™˜κ²½ λ³€μˆ˜(BASE_URL)λ₯Ό μ‚¬μš©ν•˜μ—¬ λ™μ μœΌλ‘œ μ„€μ •λ˜λ„λ‘ λ³€κ²½λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

@coderabbitai

coderabbitai Bot commented Jul 21, 2025

Copy link
Copy Markdown

Walkthrough

Kakao OAuth2 ν΄λΌμ΄μ–ΈνŠΈμ˜ λ¦¬λ‹€μ΄λ ‰νŠΈ URI 섀정이 κ³ μ •λœ URLμ—μ„œ ${BASE_URL} ν™˜κ²½ λ³€μˆ˜ 기반의 동적 κ°’μœΌλ‘œ λ³€κ²½λ˜μ—ˆμŠ΅λ‹ˆλ‹€. 이둜써 λ¦¬λ‹€μ΄λ ‰νŠΈ URIκ°€ λŸ°νƒ€μž„ μ‹œμ μ˜ BASE_URL 속성에 따라 κ²°μ •λ˜λ„λ‘ μˆ˜μ •λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

Changes

파일/경둜 λ³€κ²½ μš”μ•½
SpringBoot/src/main/resources/application.properties Kakao OAuth2 ν΄λΌμ΄μ–ΈνŠΈ λ¦¬λ‹€μ΄λ ‰νŠΈ URIλ₯Ό κ³ μ •κ°’μ—μ„œ ${BASE_URL} 기반 동적 κ°’μœΌλ‘œ λ³€κ²½

Possibly related PRs


πŸͺ§ Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

πŸ“œ Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between f053e64 and 0754a97.

πŸ“’ Files selected for processing (1)
  • SpringBoot/src/main/resources/application.properties (1 hunks)

spring.security.oauth2.client.registration.kakao.client-secret=${KAKAO_CLIENT_SECRET}
spring.security.oauth2.client.registration.kakao.client-authentication-method=client_secret_post
spring.security.oauth2.client.registration.kakao.redirect-uri=https://api.likelionnews.click/login/oauth2/code/kakao
spring.security.oauth2.client.registration.kakao.redirect-uri=${BASE_URL}/login/oauth2/code/kakao

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Verification agent

❓ Verification inconclusive

BASE_URL λ―Έμ„€μ •β€§μŠ¬λž˜μ‹œ 쀑볡 μ‹œ λŸ°νƒ€μž„ 였λ₯˜ κ°€λŠ₯μ„± – κΈ°λ³Έκ°’ 및 μ •κ·œν™” κ³ λ € ν•„μš”
redirect-uri 값에 ${BASE_URL} ν”Œλ ˆμ΄μŠ€ν™€λ”λ₯Ό 직접 μ‚½μž…ν•˜λ©΄

  1. BASE_URL이 μ„€μ •λ˜μ§€ μ•Šμ€ ν”„λ‘œνŒŒμΌμ—μ„œ Spring λΆ€νŒ… λ‹¨κ³„μ—μ„œ placeholder not resolved μ˜ˆμ™Έκ°€ λ°œμƒν•  수 있고,
  2. BASE_URL에 /둜 λλ‚˜λŠ” 값이 λ“€μ–΄μ˜€λ©΄ //login/oauth2... ν˜•νƒœλ‘œ 쀑볡 μŠ¬λž˜μ‹œκ°€ μƒμ„±λ©λ‹ˆλ‹€.

λ‹€μŒκ³Ό 같이 κΈ°λ³Έκ°’κ³Ό ν›„ν–‰ μŠ¬λž˜μ‹œ 제거λ₯Ό ν¬ν•¨ν•œ ν‘œν˜„μ‹μ„ ꢌμž₯ν•©λ‹ˆλ‹€.

-spring.security.oauth2.client.registration.kakao.redirect-uri=${BASE_URL}/login/oauth2/code/kakao
+spring.security.oauth2.client.registration.kakao.redirect-uri=${BASE_URL:https://api.likelionnews.click}/login/oauth2/code/kakao

λ˜λŠ” BASE_URL 값을 μ„€μ •ν•  λ•Œ ν›„ν–‰ μŠ¬λž˜μ‹œλ₯Ό μ œκ±°ν•˜λ„λ‘ λ¬Έμ„œν™”ν•˜μ„Έμš”.
적용 μ „/ν›„ ν™˜κ²½λ³„ λΆ€νŒ… ν…ŒμŠ€νŠΈλ₯Ό ν•œ 번 더 확인해 μ£Όμ„Έμš”.


BASE_URL λ―Έμ„€μ • 및 μŠ¬λž˜μ‹œ 쀑볡 문제 – κΈ°λ³Έκ°’ μ„€μ •κ³Ό μ •κ·œν™” ν•„μš”

문제 μš”μ•½:

  • BASE_URL이 μ„€μ •λ˜μ§€ μ•Šμ€ ν”„λ‘œνŒŒμΌμ—μ„œ Spring λΆ€νŒ… μ‹œ placeholder not resolved μ˜ˆμ™Έ λ°œμƒ κ°€λŠ₯
  • BASE_URL 끝에 μŠ¬λž˜μ‹œ(/)κ°€ ν¬ν•¨λ˜λ©΄ //login/oauth2… ν˜•νƒœλ‘œ 쀑볡 μŠ¬λž˜μ‹œ 생성

ꢌμž₯ μˆ˜μ •μ•ˆ:

-spring.security.oauth2.client.registration.kakao.redirect-uri=${BASE_URL}/login/oauth2/code/kakao
+spring.security.oauth2.client.registration.kakao.redirect-uri=${BASE_URL:https://api.likelionnews.click}/login/oauth2/code/kakao

λ˜λŠ”,

  • BASE_URL 값을 μž…λ ₯ν•  λ•Œ ν›„ν–‰ μŠ¬λž˜μ‹œλ₯Ό μ œκ±°ν•˜λ„λ‘ λ¬Έμ„œν™”
  • λ³€κ²½ μ „/ν›„ ν™˜κ²½λ³„ λΆ€νŒ… ν…ŒμŠ€νŠΈ μˆ˜ν–‰
πŸ“ Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
spring.security.oauth2.client.registration.kakao.redirect-uri=${BASE_URL}/login/oauth2/code/kakao
# SpringBoot/src/main/resources/application.properties
spring.security.oauth2.client.registration.kakao.redirect-uri=${BASE_URL:https://api.likelionnews.click}/login/oauth2/code/kakao
πŸ€– Prompt for AI Agents
In SpringBoot/src/main/resources/application.properties at line 47, the BASE_URL
placeholder may cause unresolved placeholder exceptions if not set, and trailing
slashes in BASE_URL can lead to double slashes in the redirect URI. To fix this,
provide a default value for BASE_URL using the syntax
${BASE_URL:http://default.url} to avoid unresolved placeholders, and ensure the
redirect-uri concatenation removes any trailing slash from BASE_URL to prevent
double slashes. Alternatively, document that BASE_URL should not have a trailing
slash and test application startup across environments before and after changes.

@passionryu
passionryu merged commit 61deb4b into dev Jul 21, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants