class ActionDispatch::Request

def authorization

directly or through one of the proxy alternatives.
Returns the authorization header regardless of whether it was specified
def authorization
  get_header("HTTP_AUTHORIZATION")   ||
  get_header("X-HTTP_AUTHORIZATION") ||
  get_header("X_HTTP_AUTHORIZATION") ||
  get_header("REDIRECT_X_HTTP_AUTHORIZATION")
end