Answer the question
In order to leave comments, you need to log in
How to fix 405 Not Allowed POST request error sent via API?
Good afternoon.
I met with such an error 405 Not Allowed.
The fact is that I connected the online payment with the bank via the API, the payment is successful, but after the payment they send the data that I need via a POST request, only the 405 Not Allowed error is rolled out.
How to overcome? The whole Google was covered. Even disabled CerifyCsrfToken verification in Kernel
protected $middlewareGroups = [
'web' => [
\App\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
// \Illuminate\Session\Middleware\AuthenticateSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
//\App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
],
Answer the question
In order to leave comments, you need to log in
Look php artisan route:list
. If you are sure that /notification
there is a POST
method, then look in cors - it is from some version of the stall out of the box, and it also throws this error. In addition to it, there is nothing in the stall's default set that could lead to such a result. So if everything is in order with cors (try to disable it or configure it), then do Find in path in /vendor
(or better, in the entire project) and look for any mentions of 405
, MethodNotAllowed
and METHOD_NOT_ALLOWED
.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question