Skip to content

fix: --custom-header flag implementation #242

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Jul 4, 2020

Conversation

consideRatio
Copy link
Member

The --custom-header flag added in #206 didn't seem to work, this PR attempts to fix this and also adds a test to make sure.

Given current node-http-server, the key fixes are:

  • A singular/plural typo for customHeader(s)
  • node-http-proxy configuration API, it now needs to be headers and not customHeaders
  • headers now needs to get an object, not a list of objects

Closes #223.

@consideRatio consideRatio force-pushed the fix-custom-header-flag branch from d33f890 to 3a21187 Compare June 2, 2020 10:34
@consideRatio consideRatio requested a review from minrk June 2, 2020 10:35
@consideRatio consideRatio force-pushed the fix-custom-header-flag branch from 3a21187 to 0bfca2d Compare June 2, 2020 11:04
@consideRatio
Copy link
Member Author

@minrk I think this is ready for merge

@consideRatio
Copy link
Member Author

consideRatio commented Jul 2, 2020

@minrk as the current implementation isn't working, and I've verified this implementation works with tests. I'll go ahead and self-merge this tomorrow.

@consideRatio
Copy link
Member Author

I did a another self review of my code and became more confident the implementation to fix the current broken logic makes sense. I'll go ahead and self-merge this.

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

Successfully merging this pull request may close these issues.

The --custom-header doesn't do anything
2 participants