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

The whitelist cannot use X-forwarded-for or X-real-ip to identify whether a user is on the whitelist. #505

Open
vimers01 opened this issue Jan 31, 2021 · 4 comments

Comments

@vimers01
Copy link

How to use the http header X-forword-for or X-real-ip for white names to identify the whitelist, otherwise, when there is a proxy server nginx in front of my webhook, the whitelist cannot identify the real user IP .

@moorereason
Copy link
Collaborator

webhook doesn't currently support that. You'll have to do your filtering in nginx for now.

@moorereason
Copy link
Collaborator

Proposed Solution

Add a new cidr match type and deprecate the ip-whitelist match type.

"match":
{
  "type": "cidr",
  "value": "1.2.3.0/24",
  "parameter":
  {
    "source": "request",
    "name": "remote-addr"
  }
}
"match":
{
  "type": "cidr",
  "value": "2001:db8::/32",
  "parameter":
  {
    "source": "header",
    "name": "X-forwarded-for"
  }
}

@vimers01
Copy link
Author

vimers01 commented Feb 1, 2021

Change another method to achieve the whitelist, thank you very much!

@vimers01 vimers01 closed this as completed Feb 1, 2021
@moorereason moorereason reopened this Feb 1, 2021
@0x5c0f
Copy link

0x5c0f commented Feb 22, 2024

I also encountered this issue. Has the new version already fixed it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants