C
C
ChertyakaNUB2020-10-06 15:42:35
Laravel
ChertyakaNUB, 2020-10-06 15:42:35

How to get a request from another server without a 405 error?

Hello!

I'm using the latest version of Laravel -8.
In web.php I registered the address to which the server will refer:

Route::get('/callback', [MyController::class,'callback'])->name('callback');

I registered an exception in VerifyCsrfToken, and registered an exception in my controller:
public function __construct()
    {
        $this->middleware('auth', ['except' => ['callback',...]]);
    }


When sending a request from another server to the given address /callback, I get a response: 405 Method Not Allowed .
As a result, I don’t understand where to dig and what’s wrong, it works in version 5 of the frame, what else needs to be done here, I’ve already broken my head.
Who knows what's the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
ChertyakaNUB, 2020-10-09
@ChertyakaNUB

In general, as always, the problem is in the fucking Laravel cache, the team:
php artisan route:cache
removed the error and everything worked.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question