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

use real ip from fastly in nginx #104

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

use real ip from fastly in nginx #104

wants to merge 2 commits into from

Conversation

haarg
Copy link
Member

@haarg haarg commented May 14, 2024

No description provided.

name: ingress-nginx-controller
namespace: ingress-nginx
data:
enable-real-ip: true
Copy link
Member

Choose a reason for hiding this comment

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

I think you also want use-forwarded-headers: true https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/#use-forwarded-headers

Not sure you actually need the rest or not?

Copy link
Member Author

Choose a reason for hiding this comment

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

Using enable-real-ip means nginx treats the forwarded IP as the real IP. This changes both the logged IP as well as the IP sent with the X-Forwarded-For header.

@haarg
Copy link
Member Author

haarg commented May 14, 2024

This is "working" now in that it can apply and impacts the logged IP addresses. But the new addresses shown are 10.x.x.x. Need to do more diagnostics to see what the headers are.

Also there is likely a nicer way to apply the modifications to the ConfigMap, but I'm not entirely clear how the patches mechanism works.

@haarg haarg marked this pull request as draft May 14, 2024 22:50
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.

2 participants