Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • N node-http-proxy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 482
    • Issues 482
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 102
    • Merge requests 102
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • http ... PARTY!
  • node-http-proxy
  • Merge requests
  • !736

copy headers instead of referencing them so they don't unexpectedly get overwritten

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/richardkazuomiller/copy-headers into master 10 years ago
  • Overview 5
  • Commits 2
  • Pipelines 0
  • Changes 2

Created by: richardkazuomiller

Currently common.setupOutgoing uses a reference to the original request headers, which causes Connection to be overwritten in some cases, and Host to be overwritten when changeOrigin is set to true. If you use the proxyReq to look at the original request and the proxy request you will find that those headers have been modified on the original request object.

I modified one test case that set the request headers to a string because using utils._extend on a string doesn't work. As far as I know req.headers will always be an object so I think what I did is fine but if there's a reason that was a string, I'll fix it so it checks the type.

Activity

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply

There are currently no pipelines.

To run a merge request pipeline, the jobs in the CI/CD configuration file must be configured to run in merge request pipelines.

0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
1
1 participant
Administrator
Reference: http-party/node-http-proxy!736
Source branch: github/fork/richardkazuomiller/copy-headers

Menu

Explore Projects Groups Snippets