I developed a website with a login part using Jetstream (with Fortify) to authenticate the users. In the local environment, it works fine. The production environment (via Elastic Beanstalk on AWS) does not work with the SSL certificate.
To let Laravel use HTTPS in production, I added the following code to the AppServiceProvider.
public function boot()
{
if (App::environment('production')) {
URL::forceScheme('https');
}
}
Now for all routes, it works perfectly, except for the redirect after login. Then the route is redirected with HTTP instead of HTTPS. A mixed content error shows up.
What code do I have to add or change to make it work?
To inspect all code, feel free to look at https://github.com/harmjanbeekhuis/reddingsbrigadededukers. I am happy to provide any further information required to solve this problem.