class ActionDispatch::Http::Headers
def env_name(key)
Converts an HTTP header name to an environment variable name if it is
def env_name(key) key = key.to_s if HTTP_HEADER.match?(key) key = key.upcase key.tr!("-", "_") key.prepend("HTTP_") unless CGI_VARIABLES.include?(key) end key end