title: request.xhr? triggers true when server is launched from VSCode and ITerm but not when launched on Terminal or Beanstalk?
body: <p><strong>PROBLEM</strong></p>
  
  <p>I'm storing User's locations to redirect them after sign up/ sign in. I only store locations if request.xhr? is FALSE. </p>
  
  <p>However, request.xhr? is triggering FALSE when launching the rails server form some terminals and TRUE when launching the rails server from some other terminals. </p>
  
  <p>This happens on the same requests for the same code on the same machine. Why does this happen?</p>
  
  <p><strong>I'VE TRIED</strong></p>
  
  <p>I've tried testing the same requests on the same machine, the same requests from different machines, and have compared several different requests.</p>
  
  <p>Repeatedly it seems that:</p>
  
  <p>When the rails server is launched from Terminal or AWS Elastic Beanstalk, <code>request.xhr? == false</code> which is what I expect.</p>
  
  <p>When the rails server is launched from iTerm or VSCode, <code>request.xhr? == true</code> which is not what I expect.</p>
  
  <p><strong>RELEVANT CODE</strong></p>
  
  <p>I'm checking for XHR and storing request locations in app/controllers/application_controller.rb:</p>
  
  <pre><code>
  class ApplicationController &lt; ActionController::Base
  
    ...
    before_action :store_user_location!, if: :storable_location?
    ...
  
    private
  
    def storable_location?
      puts request.fullpath
      puts "CHECKING XHR"
      puts request.xhr? # this is the line that gives differing outputs
      request.get? &amp;&amp; is_navigational_format? &amp;&amp; !devise_controller? &amp;&amp; !request.xhr? &amp;&amp; !is_a?(::CertificationsController)&amp;&amp; !is_a?(::MainController)
    end
  
    def store_user_location!
        # :user is the scope we are authenticating
        store_location_for(:user, request.fullpath)
    end
  
  </code></pre>
  
  <p><strong>EXPECTED OUTPUT</strong></p>
  
  <p>Expected: false
  Actual: true</p>
  
  <p>But only on iTerm or VSCode</p>
  
  <p>(Or I at least expect outputs to not differ based on the terminal I'm using).</p>