gitlab-org--gitlab-foss/config/initializers/trusted_proxies.rb
DJ Mountney 9ab70184e3 Pass trusted_proxies to action_dispatch as IPAddrs instead of strings
Without this setting your own trusted_proxies does not work.
2016-04-28 12:05:45 -07:00

3 lines
168 B
Ruby

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