ion
In this example we have a hypothetical Mojolicious application that uses jQuery
to POST some JSON to the server. To provide CSRF protection we make use of the
C<X-CSRF-Token> header.
It's possi
headers on each request:
<script>
$.ajaxSetup({ headers:
% use Mojo::JSON qw( to_json );
%= to_json({ 'X-CSRF-Token' => $c->crsf_token })
});
</script>
Once you've done thi