Answer the question
In order to leave comments, you need to log in
Laravel 5.5 HTTP->HTTPS?
Hello!
There is an application on two domains app.ru and api.app.ru.
All connections were http. We decided to change everything to https.
https://app.ru works correctly.
But when I try to send data from the form from app.ru to api.app.ru I get:
Request URL: https://api.app.ru/test
Request Method: POST
Status Code: 401
{"message":"Unauthenticated."}
Answer the question
In order to leave comments, you need to log in
The problem was that the cookies with tokens were set to the wrong domain.
Solution: fix in session.php config'domain' => '.app.ru',
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question