Support the ongoing development of Laravel.io →
posted 8 months ago
0

I've also done a few other things but still not working.

  1. I've tried to generate relative urls but still showing absolute.
<form method="POST" action="{{ route('login', null, false) }}"
  1. I've enabled TrustHosts as described on the docs https://laravel.com/docs/10.x/requests#configuring-trusted-pro... since my ec2 is running behind the ELB but still didn't work.

  2. I've also tried to force https schema on the web.php routes file since I've seen some projects doing this but also didn't work.

if (config('app.force_https')) {
    URL::forceScheme('https');
}
  1. I've checked and I have it already on the TrustProxies the ELB header. Request::HEADER_X_FORWARDED_AWS_ELB;
Last updated 8 months ago.
0
moderator

Is the APP_URL in your .env file with https?

0

It is

api app APP_URL=https://api.mydomain.com.br:${APP_PORT}

app APP_URL=https://painel.mydomain.com.br:${APP_PORT}

0
moderator

Did you run php artisan config:cache after changing the APP_URL values? (Or is the config not cached) else it keeps the old values.

Else it need to be something with your load balancer but to be honest I don't know how to solve that.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Nei Santos nei Joined 15 Aug 2023

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.