feat(core)!: Gate incoming HTTP body capture on dataCollection.httpBodies - #22834
feat(core)!: Gate incoming HTTP body capture on dataCollection.httpBodies#22834s1gr1d wants to merge 1 commit into
dataCollection.httpBodies#22834Conversation
size-limit report 📦
|
isaacs
left a comment
There was a problem hiding this comment.
Implementation looks great!
The test failures are pretty straightforward to fix, it looks like there are some that got missed that assert the old behavior. This patch should fix it, if I'm understanding the intent correctly: https://gist.github.com/isaacs/9897e925123d1ce714b4f20d2a589077
I notice that the Deno.serve() integration at packages/deno/src/integrations/deno-serve.ts doesn't send httpBodies at all, even if it is enabled. I think that means it's technically satisfying the spec, but it might be a nice addition to make it send them as well when enabled. That would require refactoring core's captureBodyFromWinterCGRequest method. That can be a subsequent feature addition though, even post-v11, since it's not technically a bug or spec violation, just a pre-existing inconsistency.
Gates incoming request body capture on
dataCollection.httpBodies.includes('incomingRequest')across all server SDKs. An explicit
maxRequestBodySizeoption still overrides the gate.closes #21258