Allow spaces around commas in ALLOWED_PRIVATE_ADDRESSES (#26297)

main
Val Lorentz 2023-08-03 10:05:35 +02:00 committed by GitHub
parent 2f932cb2bb
commit f55f0ab0c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -346,7 +346,7 @@ class Request
end end
def private_address_exceptions 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 end
end end