Quasar SSR - How to use CSRF headers in SSR mode? #11228
Unanswered
chAhmedRaza
asked this question in
CLI - SSR mode
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi devs!
Hope you're all doing great.
I am building a Quasar v1 SSR application. The backend of the app is build using Laravel 8 with Sanctum for CSRFtokens.
When building non-SSR SPAs I simply used to do
axios.defaults.withCredentials = true;to attache X-XSRF-TOKEN automatically to each request. But with SSR, this is not working as should because XSRF-TOKEN is received as a set-cookie header and cookies aren't available on server side in SSR mode.How should I achieve attaching the X-XSRF-TOKEN header to my requests in SSR mode? Any help will be appreciated.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions