Your approach is correct regarding the docs [ http://laravel.com/docs/5.0/routing#csrf-protection ]. One thing that crossed my mind is that maybe the $.ajaxSetup(...) is running after some of the requests are sent. Be sure to setup it before any app logic related script runs.
I mean:
<script src="//code.jquery.com/jquery.min.js"></script>
<script src="js/config.js"></script> <!-- Do your $.ajaxSetup in this file -->
<script src="js/app.js"></script>
Also in your js files don't forget to wrap your code in a $(function () {...}); or in a $(document).ready(function () {...}) which have the same effect. This will assure that any jQuery script will run only after the DOM content is loaded, like so:
// public/js/config.js
$(function () {
$.ajaxSetup({
headers: { 'X-CSRF-TOKEN': $('meta[name="_token"]').attr('content') }
});
});
If you are building your scripts with elixir, be sure to have your configuration code before your app code.