Allow spaces around commas in ALLOWED_PRIVATE_ADDRESSES (#26297)

th-downstream
Val Lorentz 1 year ago committed by GitHub
parent f51e991561
commit dab14e6b2e

@ -346,7 +346,7 @@ class Request
end
def private_address_exceptions
@private_address_exceptions = (ENV['ALLOWED_PRIVATE_ADDRESSES'] || '').split(',').map { |addr| IPAddr.new(addr) }
@private_address_exceptions = (ENV['ALLOWED_PRIVATE_ADDRESSES'] || '').split(/(?:\s*,\s*|\s+)/).map { |addr| IPAddr.new(addr) }
end
end
end

Loading…
Cancel
Save