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

Piping needle request to Express response won't set the correct headers #408

Open
zotakk4o opened this issue Jul 4, 2022 · 0 comments
Open

Comments

@zotakk4o
Copy link

zotakk4o commented Jul 4, 2022

Hi,

Having the following express server example:
app.get('/', (req, res) => needle.request('get', 'www.google.com').pipe(res));
The response does not contain the appropriate headers. For example, content-type is missing and the response is treated as text, not as HTML.

Any ideas how I can fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant