fix(backend): harden FAPI proxy resilience and spec compliance#8163
fix(backend): harden FAPI proxy resilience and spec compliance#8163
Conversation
…ipping, and DELETE body support - Propagate client abort signal to upstream fetch to prevent zombie requests - Strip dynamic hop-by-hop headers listed in the Connection header (RFC 7230) - Support request bodies on DELETE (and any method), not just POST/PUT/PATCH - Add Cache-Control: no-store to error responses to prevent CDN caching - Only set duplex option when request has a body Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@clerk/agent-toolkit
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR modifies proxy request/response handling to improve RFC 7230 compliance and cache semantics. Changes include converting hop-by-hop header tracking to a Set and adding logic to parse dynamically-nominated headers from the Connection header. Error responses now include 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Summary
fetch()to prevent zombie requests when clients disconnectConnectionheader per RFC 7230 Section 6.1, for both request and response header copyingrequest.body !== nullinstead of a method allowlistCache-Control: no-storeto all error responses to prevent CDN/browser caching of transient errorsduplex: 'half'when the request actually has a body, avoiding unnecessary option on bodyless requestsHOP_BY_HOP_HEADERSfrom array toSetfor O(1) lookupsTest plan
duplex: 'half'Cache-Control: no-storeConnectionheader are stripped from forwarded requests🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Tests