Search code examples
laravelssllaravel-5.4laravel-forge

Laravel 5.4 $request->fullURL returning non https version of URL


I am pretty sure my issue is server related but I am just not 100% sure how to fix this.

Currently I am using Laravel Forge and Envoyer. I have 3 servers: - 1 Load Balancer - 2 App Servers.

The Load Balancer is setup with the SSL certs.

Do all my app servers need to have the certs?

When i try to clone one of the domain certs to my App servers it crashes everything.

500 server errors, too many redirects. Also it is trying to load the parent domain cert when i really want to load another specific domain cert.

Let me know if I need to clarify this.

Update:

I have one code base with multiple potential domains: domain1.com, domain2.com, domain3.com etc. Some of them could have https, while some others could go without it.

Thanks in advance,

Citti


Solution

  • Cheers to Taylor himself for this answer via email.

    What I ended up needing was the following package: fideloper/trustedproxy

    I installed this and added my Front end LB as the proxie and I am good to go.

    Thanks again to Taylor for helping me out with this. Laravel FTW.

    Citti