unjs / h3

⚡️ Minimal H(TTP) framework built for high performance and portability
https://h3.unjs.io/
MIT License
3.7k stars 220 forks source link

fix(proxy): ignore incoming `accept-encoding` header #914

Closed pi0 closed 1 week ago

pi0 commented 1 week ago

Ref: https://github.com/nitrojs/nitro/issues/2880

Runtime's fetch client, might not support the encodings that the browser client supports.

The relevant issue was because Undici (Node.js) fetch does not support zstd but in general, it is an unsafe thing to pass through.

For performance, users can explicitly enable a supported accept-encoding to the server or we might later identify what runtime supports and set that instead (instead of the proxy incoming request)