Replies: 3 comments
-
It is wrong to store a session in a telegram bot. For this there is a built-in storage (see documentation), or a mysql/redis database. |
Beta Was this translation helpful? Give feedback.
-
I don't interfere with sessions at all. Laravel 11 throws this exception for any webhook request from my bot. Laravel 10 does not have this issue. |
Beta Was this translation helpful? Give feedback.
-
Very interesting, I have more than one project on version 11, and there is no such problem. Check the correctness of the library connection to the project according to the documentation. The route through which the webhook comes, It is already in the library code and there is no need to repeat it. |
Beta Was this translation helpful? Give feedback.
-
It seems in Laravel 11 it applies the 'web' routing rules such CSFR protection, which leads to this error:
"Session store not set on request"
How it's better to solve this error?
I've tried to create a new middleware
class VerifyCsrfToken extends Middleware { protected $except = [ '/telegraph/{token}/webhook', ]; }
and then add it to the telegraph config, but it does not help.
Beta Was this translation helpful? Give feedback.
All reactions