Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Laravel 11: Session store not set on request #624

Unanswered
AnFox asked this question in Q&A
Discussion options

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.

You must be logged in to vote

Replies: 3 comments

Comment options

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.

You must be logged in to vote
0 replies
Comment options

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.

You must be logged in to vote
0 replies
Comment options

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.

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.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
Converted from issue

This discussion was converted from issue #622 on August 26, 2024 06:51.

AltStyle によって変換されたページ (->オリジナル) /