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');
}
}
Comments
Great Tools for Developers
Git tower
A powerful Git client for Mac and Windows that simplifies version control.
Get Started - It's Free
Visit Tool
Mailcoach's
Self-hosted email marketing platform for sending newsletters and automated emails.
Start free
Visit Tool
Uptimia
Website monitoring and performance testing tool to ensure your site is always up and running.
Start free
Visit Tool
Please login to leave a comment.