Group
Extension

Matches 1

Mojolicious-Plugin-WithCSRFProtection ( I/IS/ISHIGAKI/Mojolicious-Plugin-WithCSRFProtection-1.02.tar.gz, ISHIGAKI, 2025; MetaCPAN )
Mojolicious-Plugin-WithCSRFProtection/lib/Mojolicious/Plugin/WithCSRFProtection.pm ( view source; MetaCPAN )
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

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.