-
-
Notifications
You must be signed in to change notification settings - Fork 715
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Bug Description
I want to use undici with the allowH2 flag to overcome CloudFlare anti-DDoS behavior, this requires :method, :authority, :path, and :scheme pseudo-headers to be sent, but undici doesn't add them on its own (as browser does) and doesn't allow to set them by myself, since the header key validation from http1.1 is applied.
Reproducible By
import {fetch, Client} from 'undici'
const client = new Client(`<http2 server>`, {
allowH2: true,
})
await fetch('<http2 resource>', {
dispatcher: client,
headers: {
':authority': '<authority>',
':method': 'GET',
':path': '<path>',
':scheme': 'https'
}
})Expected Behavior
The pseudo-headers are added by the fetch itself, or it is possible to pass them manually.
Environment
macOS Ventura 13.4.1, Node v20.5.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working