Skip to content

Properly handle multiple X-Forwarded-For addresses in runner IP

Stan Hu requested to merge sh-fix-issue-58103 into master

https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/24624 extracted the X-Forwarded-For address directly, but this didn't consider the case where multiple proxies are in the chain. To fix this, we use the Rails implementation to filter trusted proxies, as documented by Grape: https://github.com/ruby-grape/grape#remote-ip

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/58103

Edited by Stan Hu

Merge request reports