chore: use Headers.getSetCookie - #2730
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/core/utils/request/storeResponseCookies.ts`:
- Around line 8-14: The current use of Promise.all with getRawSetCookie(...)
causes concurrent cookieStore.setCookie(...) calls and can break header
application order; change the logic in the storeResponseCookies flow to apply
Set-Cookie headers sequentially (e.g., iterate over getRawSetCookie(response)
with for/for-of and await each cookieStore.setCookie(responseCookie,
request.url) before continuing) so each jar mutation and persist completes in
wire order rather than concurrently.
🪄 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: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: ed81601b-77b8-4b1e-b831-812ba06a80c2
📒 Files selected for processing (4)
.github/workflows/compat.ymlsrc/core/handlers/RequestHandler.tssrc/core/utils/HttpResponse/decorators.tssrc/core/utils/request/storeResponseCookies.ts
commit: |
Headers.prototype.getSetCookie()instead ofheaders-polyfill.set-cookieresponse headers now.