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

fix(dev): don't overwrite proxy headers if already set #896

Merged
merged 2 commits into from
Feb 1, 2023

Conversation

MikeBellika
Copy link
Contributor

πŸ”— Linked issue

#894

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Looks at X-Forwarded headers in proxyReq and doesn't overwrite them if they're present.

Resolves #894

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

src/dev/server.ts Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jan 31, 2023

Codecov Report

Merging #896 (b90aabf) into main (af0409f) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #896      +/-   ##
==========================================
+ Coverage   67.49%   67.50%   +0.01%     
==========================================
  Files          59       59              
  Lines        5864     5866       +2     
  Branches      637      637              
==========================================
+ Hits         3958     3960       +2     
  Misses       1897     1897              
  Partials        9        9              
Impacted Files Coverage Ξ”
src/dev/server.ts 75.20% <100.00%> (ΓΈ)
src/types/fetch.ts 100.00% <0.00%> (ΓΈ)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@pi0 pi0 changed the title fix: don't overwrite proxy headers if already set fix(dev): don't overwrite proxy headers if already set Feb 1, 2023
@pi0 pi0 merged commit f7eed65 into nitrojs:main Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

allow overriding x-forwarded-for header in development mode
3 participants