title: Laravel with Ajax request getting 401 Unauthorized on mobile only sometimes
body: <p>I'm working on a web application with Laravel 5.6 which uses <a href="http://bootstrap-table.wenzhixin.net.cn/documentation/" rel="nofollow noreferrer">bootstrap table</a> and some forms with file uploads. All the requests are made with Ajax and I have no problem using it from my desktop browser (Chrome on Windows). The only problem appears when I use it from mobile (Chrome on Android or Samsung Internet etc.). Sometimes I got the <strong>401 unauthenticated</strong> error message in the response. This error appears absolutely random: 1 or 2 GET/POST requests working with success, another 1-2 requests getting unauthenticated error...</p>
  
  <p>I have made some ajax setup like this, but the error persists:</p>
  
  <pre><code>$.ajaxSetup({
      headers: {
          'X-CSRF-TOKEN': document.head.querySelector('meta[name="csrf-token"]').content,
          'X-Requested-With': 'XMLHttpRequest'
      }
  });
  </code></pre>
  
  <p>Can anyone help please?</p>