title: $request->ajax() always returns false
body: <p>I face a strange behaviour with no clue at all on why and how to resolve it. I am new on PHP/Laravel/Ajax so be nice please ^^</p>
  
  <p>My blade form :</p>
  
  <pre><code>&lt;form method="post" action="{{ route('postContact') }}" id="id_post_contact"&gt;
      @csrf
      &lt;input class="form-control" type="text" name="in_email" placeholder="contact@email.com"&gt;
      [...]
      &lt;button class="btn" type="submit"&gt;Submit Question&lt;/button&gt;
  &lt;/form&gt;
  
  &lt;div&gt;
      &lt;script&gt;
          $("#id_post_contact").submit(function(e) {
              e.preventDefault();
  
              var form = $(this);
              var url = form.attr('action');
              var data2Send = form.serialize();
  
              $.ajax({
                  type:'POST',
                  url:url,
                  headers:{
                      'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content'),
                  },
                  data:data2Send,
                  dataType:'JSON',
                  cache:false,
                  //contentType:'application/json',
                  success: function(data) {
                      alert(data.success);
                  }
              });
          });
      &lt;/script&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>My route :</p>
  
  <pre><code>Route::post('/contact', 'BasisController@postContactEmail')-&gt;name('postContact');
  </code></pre>
  
  <p>My controller postContactEmail method :</p>
  
  <pre><code>public function postContactEmail(Request $req){
      dd(
          $req-&gt;ajax(),
          $req-&gt;isXmlHttpRequest(),
          $req-&gt;all()
      );
  
      return response()-&gt;json(['success' =&gt; 'Got Simple Ajax Request.']);
  }
  </code></pre>
  
  <p>And for a reason I do ignore, my <strong>$req->ajax()</strong> always return <strong>false</strong>.</p>
  
  <p>I have tried many things before asking my first question here and nothing works, especially that this same code works well till now so I have really no clue at all.</p>
  
  <p>The only different thing is my Laravel version has changed from 5.8 to 6.2.</p>
  
  <p>I dont know why my form does not send data correctly, my header request :</p>
  
  <pre><code>Accept  
  text/html,application/xhtml+xm…plication/xml;q=0.9,*/*;q=0.8
  Accept-Encoding 
  gzip, deflate, br
  Accept-Language 
  fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3
  Connection  
  keep-alive
  Content-Length  
  149
  Content-Type    
  application/x-www-form-urlencoded
  Cookie  
  __cfduid=da74c7ad6c9ff7514e482…E_OPTINVEST_CONSENT=1; _gat=1
  Host    
  fake-site.tld
  Referer 
  https://fake-site.tld/
  TE  
  Trailers
  Upgrade-Insecure-Requests   
  1
  User-Agent  
  Mozilla/5.0 (Windows NT 10.0; …) Gecko/20100101 Firefox/69.0
  </code></pre>
  
  <p>And my header response :</p>
  
  <pre><code>cf-cache-status 
  DYNAMIC
  cf-ray  
  5254def1febccdd7-CDG
  content-encoding    
  br
  content-type    
  text/html; charset=UTF-8
  date    
  Sun, 13 Oct 2019 22:50:09 GMT
  expect-ct   
  max-age=604800, report-uri="ht….com/cdn-cgi/beacon/expect-ct"
  server  
  cloudflare
  vary    
  Accept-Encoding
  X-Firefox-Spdy  
  h2
  </code></pre>
  
  <p>P.S.: my jquery version is 2.2.4 (even with the version 3.4.1, the behaviour is the same, <strong>$req->ajax() will always return false</strong>)</p>