title: React not passing authorization header to rails api
body: <p>I am using React frontend with a graphql rails api backend for a SaaS project with apartment. I need to get the authorization token from request.env so i can decode the user_id to get the tenant name which is a field in the User model. This is for a generic elevator based on the user logged in. When i inspect the Rails logger log I see that "HTTP_AUTHORIZATION"=>"" it's empty. what did i go wrong.  </p>
  
  <p>This is from the index.js where the authorization is added:</p>
  
  <pre><code>    const authLink = setContext((_, { headers }) =&gt; {
        const token = localStorage.getItem(AUTH_TOKEN)
        return {
          headers: {
            ...headers,
            authorization: token ? `Bearer ${token}` : ''
          }
        }
      })
  
      const client = new ApolloClient({
        link: authLink.concat(httpLink),
        cache: new InMemoryCache()
      })
  
      ReactDOM.render(
        &lt;BrowserRouter&gt;
          &lt;ApolloProvider client={client}&gt;
            &lt;App /&gt;
          &lt;/ApolloProvider&gt;
        &lt;/BrowserRouter&gt;, 
        document.getElementById('root')
      );
  </code></pre>
  
  <p>And this is where I try to extract it in Rails:</p>
  
  <pre><code>Rails.application.config.middleware.use Apartment::Elevators::Generic, lambda { |request|
    tenant_name = nil 
  
  
    if request.env["HTTP_AUTHORIZATION"]
  
      token = request.env["HTTP_AUTHORIZATION"]
      payload = JWT.decode token, Rails.application.secrets.secret_key_base, 'HS256'
      user_id = payload.first["user_id"]    
      tenant_name = User.find(user_id).subdomain
    end
  
    tenant_name
  }
  </code></pre>