fix error for key with number in env

This commit is contained in:
chiu 2024-07-17 13:09:41 +00:00
parent 6bba994f61
commit f2f1ecb632
1 changed files with 1 additions and 1 deletions

View File

@ -138,7 +138,7 @@ class Roda
def _proxy_headers def _proxy_headers
env_host = env['HTTP_HOST'].to_s env_host = env['HTTP_HOST'].to_s
env_new = env env_new = env
.select { |k, _v| k.start_with? 'HTTP_' } .select { |k, _v| k.to_s.start_with? 'HTTP_' }
.reject { |k, _v| k == 'HTTP_HOST' } .reject { |k, _v| k == 'HTTP_HOST' }
.transform_keys do |k| .transform_keys do |k|
k.sub(/^HTTP_/, '') k.sub(/^HTTP_/, '')