g9qkea
Last Updated: November 09, 2018
·
1.741K
· eresendez

Mixed content issue - Content must be served as HTTPS in Laravel

I want to remember this:

When changing from http to https, it's possible to get the problem Mixed content issue - Content must be served as HTTPS.

So, first modify APP_URL in the .env file, if we use the assets helper, this shouldn't give any problem with the URL.

APP_URL=https://mydomain.com

Finally, add the following to the beginning of api.php or web.php:

if (App::environment('production')) {
    URL::forceScheme('https');
}

3 Responses
Add your response

30691

You can follow this guide to know how to force laravel https to redirect. You can basically use middleware class to enable it. Or you can do it through .htaccess file.

about 2 months ago ·
30874

hello,...
I am also facing this issue, I tried to do it with the some tips online but It didn't worked. Kindly please help me with some solution... Thanks https://mobdro.ooo

about 1 month ago ·
31171

https://gta5files.com/ download the full version

7 days ago ·