hjortur17
123
14
General

The server responded with a status of 401 ()

Posted 1 week ago by hjortur17

Any ideas what this means? I'm trying to make an Axios call inside my own app but I get 401.

These are my routes:

Route::middleware('auth:api')->get('services/get', '[email protected]');
Route::middleware('auth:api')->post('car/info/get', '[email protected]');
Route::middleware('auth:api')->post('booking/create', '[email protected]');

And this is Cors.php (I added it after watching lesson here on Laracast)

return $next($request)
        ->header('Access-Control-Allow-Origin', 'https://booking.test')
        ->header('Access-Control-Allow-Headers', 'X-Requested-With');

Please sign in or create an account to participate in this conversation.