Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proxyRequest() doesn't take into account header casing when overriding headers. #450

Closed
efraimbart opened this issue Jul 18, 2023 · 1 comment · Fixed by #476
Closed
Labels
bug Something isn't working proxy

Comments

@efraimbart
Copy link

If a header is sent by the client with one casing and it's overridden with another in proxyRequest they'll both be sent.

h3/src/utils/proxy.ts

Lines 42 to 49 in a3192fb

// Headers
const headers = getProxyRequestHeaders(event);
if (opts.fetchOptions?.headers) {
Object.assign(headers, opts.fetchOptions.headers);
}
if (opts.headers) {
Object.assign(headers, opts.headers);
}

@efraimbart efraimbart changed the title proxyRequest doesn't take into account header casing when overriding headers. proxyRequest() doesn't take into account header casing when overriding headers. Jul 18, 2023
@Hebilicious Hebilicious added bug Something isn't working proxy labels Jul 19, 2023
@pi0 pi0 closed this as completed in #476 Aug 1, 2023
@pi0
Copy link
Member

pi0 commented Aug 1, 2023

Thanks for the report. It will be fixed in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working proxy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants