-
Notifications
You must be signed in to change notification settings - Fork 2k
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
real-ip configuration not applied to default server #1072
Comments
Hi @svvac It is an omission that we don't set those directives in the default server. It makes sense to add them!
With the configmap/annotations, we don't necessary have this relationship that a configmap key sets a directive in the http block and the corresponding annotation overrides the directive in the server/location block. So I wonder, if simply setting real-ip-header, set-real-ip-from and real-ip-recursive in the default server |
Well, that's what I mostly care about indeed
Not really. Skimming through the options code, I assumed those existed because the real ip params are defined in the ingress options struct, and not in the global options struct (though I ain't fluent in Go so maybe I'm missing something). Also duplicating them for each ingress rather than directly in the So in my opinion it'd be somewhat cleaner to move these in the global config (better reflecting the intent), but as I said I mostly care about having the default server using the right client IP address. |
Configuration options like
real-ip-header
,set-real-ip-from
andreal-ip-recursive
only get applied at the ingress level and not to the default server.Since these are global options, they should be applicable there too.
Current workaround is redefining them in
http-snippets
.On that note, these options are documented in the Global options, but don't appear in the Ingress options
Proposed solution :
http
blockserver
level should be added/documentedThe text was updated successfully, but these errors were encountered: