Fermin Perdomo

Senior Full Stack Engineer | PHP | JavaScript

How to fix Mixed Content: https error on laravel apps

Fermin Perdomo
January 6, 2025

If you are using a proxy or load balancer (like AWS or Heroku), ensure you trust the proxy by setting AppServiceProvider to handle HTTPS detection:

<?php use Illuminate\Support\Facades\URL; public function boot() { if($this->app->environment('production')) { // Default value should be false for local server URL::forceScheme('https'); } }

Reactions

Loading reactions...
Log in to react to this post.

Comments

Please login to leave a comment.

Great Tools for Developers

Git tower

Git tower

A powerful Git client for Mac and Windows that simplifies version control.

Get Started - It's Free
Visit Tool
Mailcoach's

Mailcoach's

Self-hosted email marketing platform for sending newsletters and automated emails.

Start free
Visit Tool
Uptimia

Uptimia

Website monitoring and performance testing tool to ensure your site is always up and running.

Start free
Visit Tool

Newsletter