http-party / http-server

a simple zero-configuration command-line http server
MIT License
13.42k stars 1.48k forks source link

Proxy target request header not present #851

Open andreaswilli opened 1 year ago

andreaswilli commented 1 year ago

Option --proxy-options.headers '{"foo": "bar"}' does not seem to be applied. Is this supposed to work or am I doing something wrong?

Environment Versions

  1. OS Type: Windows 10
  2. Node version: v14.20.0
  3. http-server version: v14.1.1

Steps to reproduce

http-server -c-1 --proxy http://localhost:8070/ --proxy-options.headers '{"foo": "bar"}' --proxy-options.secure false
  1. start server
  2. send request that is handled by the proxy
  3. Inspect the request (in my case the server is a spring boot application)

Expected result

foo: bar header is present in the proxy target request

Actual result

header is not present

github-actions[bot] commented 11 months ago

This issue has been inactive for 180 days