Pass trusted_proxies to action_dispatch as IPAddrs instead of strings

Without this setting your own trusted_proxies does not work.
This commit is contained in:
DJ Mountney 2016-04-28 12:05:45 -07:00
parent 973b948b9e
commit 9ab70184e3

View file

@ -1,2 +1,3 @@
Rails.application.config.action_dispatch.trusted_proxies =
Rails.application.config.action_dispatch.trusted_proxies = (
[ '127.0.0.1', '::1' ] + Array(Gitlab.config.gitlab.trusted_proxies)
).map { |proxy| IPAddr.new(proxy) }