Remove monkey patch of rack gem.

Removes `eis_trusted_proxies` setting.
This commit is contained in:
Artur Beljajev 2019-10-31 15:03:08 +02:00
parent 6fb8767aef
commit 3ec22bac10
2 changed files with 0 additions and 16 deletions

View file

@ -1,12 +0,0 @@
# EIS custom rack hack in order to enable test external interfaces EPP/REPP inside webserver network
module Rack
class Request
def trusted_proxy?(ip)
if ENV['eis_trusted_proxies']
ENV['eis_trusted_proxies'].split(',').map(&:strip).include?(ip)
else
ip =~ /\A127\.0\.0\.1\Z|\A(10|172\.(1[6-9]|2[0-9]|30|31)|192\.168)\.|\A::1\Z|\Afd[0-9a-f]{2}:.+|\Alocalhost\Z|\Aunix\Z|\Aunix:/i
end
end
end
end