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

Rewrite Client IP Enhancement Proposal #2329

Merged
merged 6 commits into from
Aug 6, 2024

Conversation

kate-osborn
Copy link
Contributor

@kate-osborn kate-osborn commented Aug 2, 2024

Proposed changes

Problem:
As a user of NGF
I want to rewrite the client's IP address to the original client's IP
When fronting NGF with a LoadBalancer
So that the real client's IP address is forwarded to my application
Or so that I can log the client's IP address.

Solution: Add a design for rewriting the client's IP address

Closes #2328

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.

NONE

@kate-osborn kate-osborn requested review from a team as code owners August 2, 2024 17:47
@github-actions github-actions bot added documentation Improvements or additions to documentation enhancement New feature or request labels Aug 2, 2024
docs/proposals/rewrite-client-ip.md Outdated Show resolved Hide resolved
docs/proposals/rewrite-client-ip.md Show resolved Hide resolved
docs/proposals/rewrite-client-ip.md Outdated Show resolved Hide resolved
docs/proposals/rewrite-client-ip.md Outdated Show resolved Hide resolved
Copy link

codecov bot commented Aug 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.74%. Comparing base (d014463) to head (2eda31f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2329   +/-   ##
=======================================
  Coverage   87.74%   87.74%           
=======================================
  Files          96       96           
  Lines        6830     6830           
  Branches       50       50           
=======================================
  Hits         5993     5993           
  Misses        780      780           
  Partials       57       57           

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

@kate-osborn kate-osborn requested a review from sjberman August 5, 2024 15:38
Copy link
Contributor

@salonichf5 salonichf5 left a comment

Choose a reason for hiding this comment

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

great work 👏

@kate-osborn kate-osborn force-pushed the feat/proxy-protocol-api branch from 026e131 to 556e732 Compare August 6, 2024 14:56
@mpstefan
Copy link
Collaborator

mpstefan commented Aug 6, 2024

Love the use case approach. Recursive is still weird, but I'm good with exposing it in the API as long as it's optional. NGINX directive approach sounds pretty similar to our NGINX customization that we plan to deliver next release, so I don't think we'd ever need to follow that pattern...

Thanks for the write-up, Kate!

@kate-osborn kate-osborn force-pushed the feat/proxy-protocol-api branch from 556e732 to 2eda31f Compare August 6, 2024 18:46
@kate-osborn kate-osborn merged commit 9840a51 into nginxinc:main Aug 6, 2024
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Refine Use Cases and Define API
4 participants