Skip to content

Proxy target request header not present #851

Open
@andreaswilli

Description

@andreaswilli

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions