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

Support real-ip in default server #1129

Merged
merged 4 commits into from
Sep 8, 2020
Merged

Support real-ip in default server #1129

merged 4 commits into from
Sep 8, 2020

Conversation

LorcanMcVeigh
Copy link
Contributor

@LorcanMcVeigh LorcanMcVeigh commented Sep 4, 2020

Proposed changes

Support real-ip-header, real-ip-recursive and set-real-ip-from in the default server

Fixes: #1072

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 master
  • I will ensure my PR is targeting the master branch and pulling from my branch from my own fork

@LorcanMcVeigh LorcanMcVeigh added the bug An issue reporting a potential bug label Sep 4, 2020
@LorcanMcVeigh LorcanMcVeigh self-assigned this Sep 4, 2020
Copy link
Contributor Author

@LorcanMcVeigh LorcanMcVeigh left a comment

Choose a reason for hiding this comment

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

There is some weird indentation/alignment appearing in the files changed tab but locally they look fine, could someone check it out just to be sure

internal/configs/version1/nginx-plus.tmpl Outdated Show resolved Hide resolved
internal/configs/version1/nginx.tmpl Outdated Show resolved Hide resolved
@Dean-Coakley
Copy link
Contributor

@LorcanMcVeigh Indentation looks strange because it has a mix of tabs and spaces.

I believe this happened because you copied the config from https://github.com/nginxinc/kubernetes-ingress/blob/master/internal/configs/version1/nginx.ingress.tmpl which uses tabs, into a file that uses spaces.

You should be able to just delete all the white space and recreate with your editor to resolve it.

VSCode has a nice helper:
image

Which will make it obvious:
image

Copy link
Contributor

@Dean-Coakley Dean-Coakley left a comment

Choose a reason for hiding this comment

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

LGTM.

You can add Fixes: https://github.com/nginxinc/kubernetes-ingress/issues/1072 to the PR description to autoclose that issue upon merge if you want.

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.

🚀

@LorcanMcVeigh LorcanMcVeigh merged commit 905b69c into master Sep 8, 2020
@LorcanMcVeigh LorcanMcVeigh deleted the support-real-ip branch September 8, 2020 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue reporting a potential bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

real-ip configuration not applied to default server
3 participants