middleware redirecting to login screen

Asked

Viewed 82 times

0

good afternoon everyone! I have the route below:

Route::get('produtos', 'ProdutosControlador@index')->middleware('auth:api');

well it happens that using Postman I am trying to access and for any reason the Windows automatically redirect to the login page... i want to have access to error message , how do I see what went wrong and how do I stop this redirect??? Without further ado, thank you for your attention!!

  • You are sending the access information by Postman?

  • yes...sending by Postman and restlet, and both redirect...

  • And what data do you send?

  • send the generated token, and the url I want to access...

  • is adding the header content-type: application/json ?

1 answer

0

This also happens to me on some routes testing with Postman. I can solve by adding the header Accept:application/json then whenever I’m testing Ace on Postman I use this header.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.