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

Correct header name validation #1239

Merged
merged 3 commits into from
Nov 10, 2023

Conversation

bjee19
Copy link
Contributor

@bjee19 bjee19 commented Nov 9, 2023

Proposed changes

Correct header name validation.

Problem: Header name validation was not being implemented by NGF thus any problems would be caught by nginx and would not be as visible.

Solution: NGF now validates header names and will show an error in the HTTPRoute status.

Testing: Added unit tests and manually tested that if trying to apply an HTTPRoute with an invalid header name, the HTTPRoute status is correctly showing the error.

Closes #766

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

@bjee19 bjee19 requested a review from a team as a code owner November 9, 2023 18:29
@github-actions github-actions bot added the bug Something isn't working label Nov 9, 2023
@bjee19
Copy link
Contributor Author

bjee19 commented Nov 9, 2023

Here is a snip of what the HTTPRoute shows when it is applied with an invalid header name.

image

Copy link
Member

@ciarams87 ciarams87 left a comment

Choose a reason for hiding this comment

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

🚀

@bjee19 bjee19 requested a review from pleshakov November 9, 2023 22:11
Copy link
Contributor

@pleshakov pleshakov left a comment

Choose a reason for hiding this comment

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

👍

@bjee19 bjee19 force-pushed the bug/incorrect-header-name-validation branch from 4820db0 to ecf9e42 Compare November 9, 2023 22:56
@bjee19 bjee19 merged commit 6628e38 into nginxinc:main Nov 10, 2023
23 checks passed
@bjee19 bjee19 deleted the bug/incorrect-header-name-validation branch November 20, 2023 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Incorrect header name validation in routing rules
5 participants