I am using Laravel / PHP (and vuejs)
I have no idea what changed, I have been working on https for some months now, and suddently it seems like all redirections are trying to visit http pages instead of https.
For example the login controller
public function redirectTo(){
$type = Auth::user()->type;
switch ($type) {
case 'O':
return '/blabla';
break;
default:
return '/home'; //this page is going to http://mywebsite.com/home instead of https://mywebsite.com/home
break;
}
}
when adding ->secure(), it works, but I don't think I should add it in all my project...
return redirect()->secure('/test');
I'm sorry the error is in french: Blocage du chargement du contenu mixte actif (mixed active content) « http://mywebsite.com/home » TypeError: "NetworkError when attempting to fetch resource." app.js:1:2175324 Blocage d’une requête multiorigines (Cross-Origin Request) : la politique « Same Origin » ne permet pas de consulter la ressource distante située sur https://ip2c.org/s. Raison : échec de la requête CORS.
Here is my .env file:
APP_NAME=MYWEBSITE
APP_ENV=production
APP_DEBUG=false
APP_URL=https://mywebsite.com
MIX_APP_URL=https://mywebsite.com
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire