@steveleg based on the routes list seems like that these are not API routes. Right ?
POST returns 405 while my routes are OK
Hi everyone, I have a weird problem. I try to log in with POST (username/password) to my application with this route
Route::post('login', 'AuthController@postLogin')->name('login.post');
I get a 405
The POST method is not supported for this route. Supported methods: GET, HEAD
In the local development environment everything is fine. In a production server environment I get this error.
I use Postman fos testing.
This is my route list
- GET|HEAD | /
- GET|HEAD | domains -GET|HEAD | login
- POST | login
- GET|HEAD | research-programs
- GET|HEAD | researchers
- GET|HEAD | researchers/profile
- PUT | researchers/profile
- POST | researchers/profile/picture
- GET|HEAD | researchers/random
- GET|HEAD | researchers/search
- GET|HEAD | researchers/{id}
- PUT | researchers/{id}
- POST | researchers/{id}/picture
- GET|HEAD | units
I added a GET /login route and dumped the \Illuminate\Http\Request object to see what I got.
These lines tell me that there is a redirect?
"REDIRECT_REDIRECT_REDIRECT_STATUS" => "200"
"REDIRECT_REDIRECT_REDIRECT_UNIQUE_ID" => "ZQ27NKn65K-juEgBrlpqKgAAAMw"
"REDIRECT_REDIRECT_REDIRECT_URL" => "/login/"
"REDIRECT_REDIRECT_REQUEST_METHOD" => "POST"
"REDIRECT_REDIRECT_REQUEST_SCHEME" => "https"
"REDIRECT_REDIRECT_REQUEST_URI" => "/login/?XDEBUG_SESSION_START=PHPSTORM"
"REDIRECT_REDIRECT_SERVER_PORT" => "443"
"REDIRECT_REDIRECT_SERVER_PROTOCOL" => "HTTP/1.1"
"REDIRECT_REDIRECT_STATUS" => "500"
...
"REDIRECT_REDIRECT_UNIQUE_ID" => "ZQ27NKn65K-juEgBrlpqKgAAAMw"
"REDIRECT_STATUS" => "500"
"REDIRECT_UNIQUE_ID" => "ZQ27NKn65K-juEgBrlpqKgAAAMw"
"REDIRECT_URL" => "/500.shtml"
"REMOTE_PORT" => "54560"
"REQUEST_METHOD" => "GET"
"REQUEST_SCHEME" => "https"
I've been struggling with this for hours now.
Please or to participate in this conversation.