HTTP Header size limit

How do I change the max http header size for miniflare? The node configuration flag does not appear to work (node 20.11.1). Is there another option needed? A little digging showed that undici could potentially be causing issues but I wasn’t sure if that mattered within workerd or not
1 Reply
Thaidikar
ThaidikarOP7mo ago
Undici was an additional issue. I had to add the following within the code starting miniflare;
import { Agent, setGlobalDispatcher } from 'undici';

// Enforce node standards
setGlobalDispatcher(new Agent({
maxHeaderSize: 32768,
headersTimeout: 2000,
}))
import { Agent, setGlobalDispatcher } from 'undici';

// Enforce node standards
setGlobalDispatcher(new Agent({
maxHeaderSize: 32768,
headersTimeout: 2000,
}))
This let me get past the default but I'm still having issues getting miniflare to work all the way up to the Worker limit of 32 KB Currently I am maxing out around 24689 bytes in the headers
Want results from more Discord servers?
Add your server