skyrpex / laravel-nuxt-js

Build a SPA with Laravel and Nuxt.
https://www.npmjs.com/package/laravel-nuxt
MIT License
146 stars 20 forks source link

CSRF token #20

Closed yodyyyy closed 5 years ago

yodyyyy commented 5 years ago

It's possible to add csrf meta tags inside <head> like vue does? Thank you

skyrpex commented 5 years ago

You could do it in the PHP packages by modifying the https://github.com/skyrpex/laravel-nuxt/blob/c5a1ceb56ee5b4fd3ef5afdfc9bddce291715014/src/Controllers/NuxtController.php#L30 line. You could append the meta tag before the </head>.

Anyway, I would suggest to use cookies instead.