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

Fetch allow modifying Host header #16840

Closed
Tc-001 opened this issue Nov 26, 2022 · 1 comment · Fixed by #19689
Closed

Fetch allow modifying Host header #16840

Tc-001 opened this issue Nov 26, 2022 · 1 comment · Fixed by #19689

Comments

@Tc-001
Copy link

Tc-001 commented Nov 26, 2022

Currently it is impossible to modify the Host header when calling fetch().

This is not a duplicate of #11017 , because that asked to disallow the header to be modified, while I am requesting for a way to allow modifying it.

It is needed for us to communicate with an internal system that only ever expects the Host header to be an external-facing domain. (a reverse proxy or changing the machines /etc/hosts seems a bit overkill)

It could be part of Deno.createHttpClient ({allowCustomHost: true} or similar) as described in #6868 (comment)

@Tc-001 Tc-001 changed the title Allow modifying Host header Fetch allow modifying Host header Nov 26, 2022
@gbrlmtrz
Copy link

I am also facing similar issues when trying to reach a service on kubernetes, is there any way to set this header on Deno?

bartlomieju pushed a commit that referenced this issue Jul 28, 2023
This adds an option to allow using the host header in a fetch call.
Closes #16840
Ref #11017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants