How to fix Mixed Content: https error on laravel apps

Fermin Perdomo Fermin Perdomo
schedule 1 min read

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

lock You need to be logged in to react.
Log In

Newsletter

Get new posts delivered straight to your inbox.

mail

Great Tools for Developers

Git Tower

Git Tower

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

Visit arrow_forward
Mailcoach

Mailcoach

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

Visit arrow_forward
Uptimia

Uptimia

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

Visit arrow_forward
Cloudways

Cloudways

Managed cloud hosting platform that simplifies server management for developers.

Visit arrow_forward

Comments

No comments yet. Be the first to share your thoughts.

chat_bubble Join the conversation — log in to leave a comment.
Log In