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

De-duplicate base headers if specified by user #3249

Merged
merged 2 commits into from
Mar 26, 2025
Merged

Conversation

sjberman
Copy link
Collaborator

Problem: If a user set a header in a header filter that had a default value set by NGF, both values would end up being set.

Solution: If provided by a user, don't set the default header value.

Testing: Unit test and manual verification of header de-duplication.

Closes #3192

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

Release notes

If this PR introduces a change that affects users and needs to be mentioned in the release notes,
please add a brief note that summarizes the change.

Fix an issue where default headers were still being set when overwritten by a user.

Problem: If a user set a header in a header filter that had a default value set by NGF, both values would end up being set.

Solution: If provided by a user, don't set the default header value.
@sjberman sjberman requested a review from a team as a code owner March 21, 2025 15:13
@github-actions github-actions bot added the bug Something isn't working label Mar 21, 2025
Copy link

codecov bot commented Mar 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.16%. Comparing base (60b6b19) to head (87a638e).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3249   +/-   ##
=======================================
  Coverage   86.15%   86.16%           
=======================================
  Files         113      113           
  Lines       11658    11664    +6     
  Branches       62       62           
=======================================
+ Hits        10044    10050    +6     
  Misses       1553     1553           
  Partials       61       61           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sjberman sjberman enabled auto-merge (squash) March 26, 2025 15:26
@sjberman sjberman merged commit 9c4912a into main Mar 26, 2025
40 checks passed
@sjberman sjberman deleted the bug/header-duplication branch March 26, 2025 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working release-notes
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

HTTPRoute filters need to apply the user provided value for the existing headers
3 participants