Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
744 views
in Technique[技术] by (71.8m points)

php - laravel - CSRF token always changes

Well this is the problem I am facing from yesterday. It is always giving me TokenMismatchException and when I digged in and compared a few things, I found that on my local server, the _token field never changes. But on my production, it does. And that's the reason it kept giving me TokenMismatchException. Does anyone know how to fix this error.

I have

  1. seen this question
  2. Went through documentation.
  3. Wrote several codeception tests.
  4. <input id="token" type="hidden" value="{{ csrf_token() }}"> this already in my code.
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Check if you have domain in the config/session.php setup to the right path. Even I had got the same problem. And resolved it just by changing that path.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...