Skip to content

๐Ÿ“ (study) 8์ฃผ์ฐจ API ๋Œ€๋ฉด ์ž๋ฃŒ ๋ณด๊ฐ•#22

Merged
seoJing merged 3 commits into
mainfrom
feat/study/week8-api-cors
May 14, 2026
Merged

๐Ÿ“ (study) 8์ฃผ์ฐจ API ๋Œ€๋ฉด ์ž๋ฃŒ ๋ณด๊ฐ•#22
seoJing merged 3 commits into
mainfrom
feat/study/week8-api-cors

Conversation

@seoJing
Copy link
Copy Markdown
Owner

@seoJing seoJing commented May 14, 2026

์ž‘์—…

  • ๋Œ€๋ฉด 8์ฃผ์ฐจ API/CORS ์ž๋ฃŒ๋ฅผ HTTP, AJAX, Fetch, Axios, ์ธ์ฆ, TanStack Query ํ๋ฆ„์œผ๋กœ ๋ณด๊ฐ•ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • CORS ๋™์ž‘ ๋ฐฉ์‹๊ณผ ํ”„๋ก ํŠธ ๊ฐœ๋ฐœ ์„œ๋ฒ„ ํ”„๋ก์‹œ์˜ ์›๋ฆฌ/์žฅ๋‹จ์ ์„ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • 7์ฃผ์ฐจ ํŒŒ์ผ ๊ตฌ์กฐ ๋‚ด์šฉ๊ณผ ์ด์–ด์ง€๋„๋ก API ํŒŒ์ผ ๋ฐฐ์น˜ ์˜ˆ์‹œ๋ฅผ ์ •๋ฆฌํ–ˆ์Šต๋‹ˆ๋‹ค.
  • 9์ฃผ์ฐจ Next.js ๋ Œ๋”๋ง ์ž๋ฃŒ์™€ ๊ด€๋ จ ์•ˆ๋‚ด ๋ฌธ๊ตฌ๋ฅผ ์ตœ์‹  ํ๋ฆ„์— ๋งž์ท„์Šต๋‹ˆ๋‹ค.

๊ฒ€์ฆ

  • pnpm build ์„ฑ๊ณต

๋ฉ”๋ชจ

  • PR ๋ธŒ๋žœ์น˜๋Š” ์Šคํ„ฐ๋”” ๊ด€๋ จ 5๊ฐœ MDX ํŒŒ์ผ๋งŒ ํฌํ•จํ•˜๋„๋ก main ๊ธฐ์ค€์œผ๋กœ ๋ถ„๋ฆฌํ–ˆ์Šต๋‹ˆ๋‹ค.

Summary by CodeRabbit

  • Documentation
    • Updated curriculum roadmap: week 9 now focuses on Next.js rendering and web performance
    • Enhanced week 8 API content with expanded CORS curriculum and modern API integration patterns
    • Aligned course wrap-up and learning objectives with updated topic schedule

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 14, 2026

Caution

Review failed

The pull request is closed.

โ„น๏ธ Recent review info
โš™๏ธ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 047cf722-3ba4-4cf4-ae89-518cf40f2582

๐Ÿ“ฅ Commits

Reviewing files that changed from the base of the PR and between c72e1e5 and 35dc158.

๐Ÿ“’ Files selected for processing (1)
  • apps/web/content/study/clab-26-1/in-person/week8.mdx

๐Ÿ“ Walkthrough

Walkthrough

Week 8 in-person lecture extensively rewritten to position API interactions as frontend-backend contracts, expanded with CORS curriculum and modern API integration patterns. Week 6, 9, and 11 course overviews synchronized to reflect curriculum shift from web security topics to Next.js rendering and performance in week 9.

Changes

API Contract-Driven API Learning & Curriculum Alignment

Layer / File(s) Summary
Week 8: API Contracts & CORS Foundation
apps/web/content/study/clab-26-1/in-person/week8.mdx
Early description and section 1 repositioned API work as frontend-backend contractual agreements. Sections 4โ€“6 introduce expanded CORS curriculum: origins and SOP, request verification, preflight flow, credentialed requests, and resolution strategies (server headers and development proxy).
Week 8: Modern API Integration & Code Architecture
apps/web/content/study/clab-26-1/in-person/week8.mdx
Section 7 covers HTTP fundamentals, AJAX vs page reloads, callbackโ†’Promise/async-await, Fetch vs Axios (error handling), interceptors, token auth with refresh/401, and TanStack Query (query/mutation, cache invalidation). Section 8 provides file organization guidance (common HTTP client vs feature modules). Section 9 replaces example-only guidance with API contract checklist: auth, error codes, empty-list response shape, pagination indexing, CORS origins.
Week 8 Closing & Curriculum Timeline Synchronization
apps/web/content/study/clab-26-1/in-person/week8.mdx, apps/web/content/study/clab-26-1/week9.mdx, apps/web/content/study/clab-26-1/in-person/week6-1.mdx, apps/web/content/study/clab-26-1/in-person/week11.mdx
Week 8 recap and week 9 teaser transition from web security to Next.js rendering/hydration. Week 9 intro reframes topic as "Next.js ๋ Œ๋”๋ง ์ง„ํ™”์™€ ์›น ํผํฌ๋จผ์Šค" and reconnects async/structural fundamentals (map/filter, destructuring, spread, modules) to server/client component separation and data-UI integration. Week 6-1 and week 11 course outline entries updated to align week 9 topic reference.

Estimated code review effort

๐ŸŽฏ 2 (Simple) | โฑ๏ธ ~12 minutes

Possibly related PRs

  • seoJing/SEOJing#18: Both PRs realign week 9 study content from web security toward Next.js rendering/performance, though they modify different MDX variants.

Poem

๐Ÿฐ API contracts handshake, CORS walls crumble,

Fetch and Axios dance, promises don't tumble,

From security shields to rendering dreams so bright,

Next.js takes the stageโ€”web vitals in sight! โœจ

๐Ÿšฅ Pre-merge checks | โœ… 4 | โŒ 1

โŒ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check โ“ Inconclusive PR ์ œ๋ชฉ์€ ์ด๋ชจ์ง€๋ฅผ ํฌํ•จํ•˜๊ณ  ์žˆ์œผ๋ฉฐ, ์ฃผ์š” ๋ณ€๊ฒฝ์‚ฌํ•ญ์ธ 8์ฃผ์ฐจ API/CORS ์ž๋ฃŒ ๋ณด๊ฐ•์„ ๋ช…ํ™•ํžˆ ๋ฐ˜์˜ํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ๋‹ค๋งŒ ์ด๋ชจ์ง€์˜ ์‚ฌ์šฉ๊ณผ ๊ฐ„๋‹จํ•œ ํ‘œํ˜„์€ ๊ตฌ์ฒด์„ฑ์ด ๋ถ€์กฑํ•ฉ๋‹ˆ๋‹ค. ์ด๋ชจ์ง€๋ฅผ ์ œ๊ฑฐํ•˜๊ณ  '8์ฃผ์ฐจ API/CORS ํ•™์Šต ์ž๋ฃŒ ๋ณด๊ฐ• ๋ฐ 9์ฃผ์ฐจ Next.js ๋ Œ๋”๋ง ์•ˆ๋‚ด ์—…๋ฐ์ดํŠธ'์ฒ˜๋Ÿผ ์ฃผ์š” ๋ณ€๊ฒฝ์‚ฌํ•ญ์„ ๋” ๊ตฌ์ฒด์ ์œผ๋กœ ์„ค๋ช…ํ•˜๋Š” ๊ฒƒ์„ ๊ถŒ์žฅํ•ฉ๋‹ˆ๋‹ค.
โœ… Passed checks (4 passed)
Check name Status Explanation
Description Check โœ… Passed Check skipped - CodeRabbitโ€™s high-level summary is enabled.
Docstring Coverage โœ… Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check โœ… Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check โœ… Passed Check skipped because no linked issues were found for this pull request.

โœ๏ธ Tip: You can configure your own custom pre-merge checks in the settings.

โœจ Finishing Touches
๐Ÿงช Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/study/week8-api-cors

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

๐Ÿ”ง ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

apps/web/content/study/clab-26-1/in-person/week8.mdx

Oops! Something went wrong! :(

ESLint: 9.39.4

Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@eslint/js' imported from /packages/config/eslint/base.js
at Object.getPackageJSONURL (node:internal/modules/package_json_reader:301:9)
at packageResolve (node:internal/modules/esm/resolve:764:81)
at moduleResolve (node:internal/modules/esm/resolve:855:18)
at defaultResolve (node:internal/modules/esm/resolve:988:11)
at #cachedDefaultResolve (node:internal/modules/esm/loader:697:20)
at #resolveAndMaybeBlockOnLoaderThread (node:internal/modules/esm/loader:714:38)
at ModuleLoader.resolveSync (node:internal/modules/esm/loader:746:52)
at #resolve (node:internal/modules/esm/loader:679:17)
at ModuleLoader.getOrCreateModuleJob (node:internal/modules/esm/loader:599:35)
at ModuleJob.syncLink (node:internal/modules/esm/module_job:162:33)

Tip

๐Ÿ’ฌ Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire orgโ€”no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-inโ€”scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

๐Ÿ‘‰ Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

โค๏ธ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 14, 2026

Deploying with ย Cloudflare Workers ย Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
โœ… Deployment successful!
View logs
seojing 35dc158 Commit Preview URL

Branch Preview URL
May 14 2026, 01:35 PM

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

๐Ÿค– Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/web/content/study/clab-26-1/in-person/week8.mdx`:
- Around line 463-468: The example uses localStorage.getItem("accessToken")
inside apiClient.interceptors.request.use which can be misread as a recommended
production pattern; update the MDX around this snippet to add a clear security
note stating this is a simple learning example, warn about XSS risks of storing
tokens in localStorage, and recommend using HttpOnly + Secure cookies
(server-set session/refresh cookies) or other secure storage flows as the
preferred production approach; mention briefly that with cookies the server
handles token storage and CSRF/SameSite considerations and link or point readers
to implement refresh-token flows instead of client-side localStorage.
๐Ÿช„ Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

โ„น๏ธ Review info
โš™๏ธ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: dd4d7e34-38a2-4c18-a0c0-aaf6acc5a04b

๐Ÿ“ฅ Commits

Reviewing files that changed from the base of the PR and between 1c0fd89 and c72e1e5.

๐Ÿ“’ Files selected for processing (5)
  • apps/web/content/study/clab-26-1/in-person/week11.mdx
  • apps/web/content/study/clab-26-1/in-person/week6-1.mdx
  • apps/web/content/study/clab-26-1/in-person/week8.mdx
  • apps/web/content/study/clab-26-1/in-person/week9.mdx
  • apps/web/content/study/clab-26-1/week9.mdx

Comment thread apps/web/content/study/clab-26-1/in-person/week8.mdx
@seoJing
Copy link
Copy Markdown
Owner Author

seoJing commented May 14, 2026

CodeRabbit์˜ localStorage ํ† ํฐ ์ €์žฅ ๋ณด์•ˆ ์ง€์  ๋ฐ˜์˜ํ–ˆ์Šต๋‹ˆ๋‹ค. ํ•™์Šต์šฉ ๋‹จ์ˆœ ์˜ˆ์‹œ์ž„์„ ๋ช…์‹œํ•˜๊ณ , XSS ์œ„ํ—˜ ๋ฐ HttpOnly + Secure + SameSite ์ฟ ํ‚ค ๊ธฐ๋ฐ˜ ์ธ์ฆ์„ ์‹ค๋ฌด ๋Œ€์•ˆ์œผ๋กœ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค. Refresh Token ์„น์…˜์—๋„ ์ฟ ํ‚ค ๊ธฐ๋ฐ˜ ์ธ์ฆ ์‹œ CSRF/SameSite/CORS credentials๋ฅผ ๋ฐฑ์—”๋“œ์™€ ๋งž์ถฐ์•ผ ํ•œ๋‹ค๋Š” ์„ค๋ช…์„ ๋ณด๊ฐ•ํ–ˆ์Šต๋‹ˆ๋‹ค.

@seoJing seoJing merged commit aaee9df into main May 14, 2026
1 of 3 checks passed
@seoJing seoJing deleted the feat/study/week8-api-cors branch May 14, 2026 13:34
@codecov-commenter
Copy link
Copy Markdown

โš ๏ธ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

โœ… All modified and coverable lines are covered by tests.

๐Ÿ“ข Thoughts on this report? Let us know!

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