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
Bug Description
I want to use
undiciwith theallowH2flag to overcome CloudFlare anti-DDoS behavior, this requires:method,:authority,:path, and:schemepseudo-headers to be sent, butundicidoesn'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
Expected Behavior
The pseudo-headers are added by the
fetchitself, or it is possible to pass them manually.Environment
macOS Ventura 13.4.1, Node v20.5.0