How to set CSRF token for post request in Framework7Vue app

I want to make request from app to laravel, and it asks for me csrf token . is there any idea to authenticate from laravel to framework7vue app with token(csrf) or need to authenticate with JWT?

Simple, use headers… Normal ajax

  url: '...your laravel url',
  data: {},
 headers: {
  Authorization: 'Bearer something',
  'csrf': 'some-token'

make sure your server is configured to read csrf or auth headers otherwise CORS will fail you… As for your server side code, you will google how…:grin:

1 Like