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

Request proxying of custom HTTP headers #652

Open
tammingaj opened this issue Sep 8, 2020 · 5 comments
Open

Request proxying of custom HTTP headers #652

tammingaj opened this issue Sep 8, 2020 · 5 comments
Labels
good first issue Hacktoberfest minor version stale

Comments

@tammingaj
Copy link

@tammingaj tammingaj commented Sep 8, 2020

Steps to reproduce the issue, if applicable. Include the actual command and output and/or stack trace.

  1. Start http-server with the -P parameter pointing to a backend server that is reachable.
  2. Send a request, containing a custom HTTP header, to http-server that should be proxied to the configured server.

What did you expect to happen?
I expect the custom HTTP header to be available in the request as it is received in the backend server.

If the issue is a feature request, what is the motivation / use case for it?
I use http-server to run a development version of my Angular web application. The application needs data from a REST endpoint that requires a custom HTTP header to be present.

Tell us about your environment

  • **exact http-server version:**0.12.3
  • **Node version:**8.10.0
  • **Platform:**Windows 10
@nilsdjupvik
Copy link

@nilsdjupvik nilsdjupvik commented Sep 10, 2020

👍

@cor3000
Copy link

@cor3000 cor3000 commented Oct 21, 2020

Another scenario is to set proxy headers such as "X-Forwarded-For" / "X-Forwarded-Proto" ... to give the back end server hints about the public URL.

@github-actions
Copy link

@github-actions github-actions bot commented Aug 17, 2021

This issue has been inactive for 180 days

@thornjad
Copy link
Member

@thornjad thornjad commented Aug 17, 2021

I'd consider this a breach of the principle of least astonishment, request headers should be forwarded

@thornjad thornjad added the minor version label Aug 17, 2021
@github-actions github-actions bot removed the stale label Aug 18, 2021
@thornjad thornjad added the Hacktoberfest label Sep 30, 2021
@github-actions
Copy link

@github-actions github-actions bot commented Apr 12, 2022

This issue has been inactive for 180 days

@github-actions github-actions bot added the stale label Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Hacktoberfest minor version stale
Projects
None yet
Development

No branches or pull requests

4 participants