In your AppServiceProvider.php file, inside boot function:
if ($this->app->isProduction()) {
\Illuminate\Support\Facades\URL::forceScheme('https');
}
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello All,
I create a project, i wrote codes and deployed to AWS Elastic Beanstalk. After this, added load balancer and certificate.
Current status : Site now work, redirections are right but website request an insecure CSS vs js. Chrome console return ;
Mixed Content: The page at 'https://*********/' was loaded over HTTPS, but requested an insecure stylesheet 'http://*********/build/assets/app-584e658f.css'. This request has been blocked; the content must be served over HTTPS.
How i resolve this error. Inertia or Vite or Laravel setting ? in AWS ?
In your AppServiceProvider.php file, inside boot function:
if ($this->app->isProduction()) {
\Illuminate\Support\Facades\URL::forceScheme('https');
}
Please or to participate in this conversation.