inertia-laravel icon indicating copy to clipboard operation
inertia-laravel copied to clipboard

Inertiajs ignoring methods, when the request is redirected.

Open hicham-saddek opened this issue 4 years ago • 3 comments
trafficstars

Problem

The request that is made for the Laravel Application, is being redirected as part of the application main logic, but inertiajs methods seems to be lost in the request body, i have to replace the _METHOD of the post request to the content of the header REDIRECT_REDIRECT_REQUEST_METHOD each time as the REQUEST_METHOD is not provided by inertia.

How to fix

I use a seprate middleware for the moment, but it will be much apreciated if we can check inside the main Inertia Middleware, to confirm the right method.

Solution

inertia-middleware-ignoring-methods

I will also be working to provide a PR for this issue.

hicham-saddek avatar Apr 11 '21 19:04 hicham-saddek

@hicham-saddek can you still replicate this? I have never encountered this myself. Please close the issue if this is no longer relevant and/or has been solved.

crnkovic avatar Jan 18 '23 09:01 crnkovic

@crnkovic, I am still able to reproduce this error, the steps are in the PR request available here PR

hicham-saddek avatar Jan 18 '23 21:01 hicham-saddek

@crnkovic , @reinink - it looks like I'm getting this too, and no one seems to have even bothered to look at the PR. Am I missing something?

AntonOfTheWoods avatar Nov 26 '23 08:11 AntonOfTheWoods