mardi 28 novembre 2017

Laravel AJAX/API request not working on AWS

My Laravel 5.5 app has a very simply AJAX POST to the server that works perfectly locally, but returns a 500 Server Error when deployed to my Elastic Beanstalk instance.

I've narrowed down the issue somewhat, but I'm still stumped.

I'm using a route defined in routes/api.php:

Route::post('availabletimes','TimesController@show');

As I test I have reduced TimesController@show to be simply:

public function show(GetShowTimes $request) {
  return "OK";
}

It couldn't be simpler.

I've checked that the X-CSRF-TOKEN is being sent. I've used Postman to test this, as well as my site, and the result is the same: Locally works fine (returns "OK"), deployed to AWS just returns a 500 Server Error.

I've looked through the server logs, and I can see the error being raised, but there's no other information:

"POST /api/availabletimes HTTP/1.1" 500

How can I debug this?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2iXOipY
via IFTTT

Aucun commentaire:

Enregistrer un commentaire