Using HTTPS for a Laravel app behind an AWS Elastic Load Balancer

When using an AWS Elastic Load Balancer, the communication between the load balancer and your server is HTTP. Laravel will adjust the urls crated based on the protocol but since it only see’s http it can cause issues. To resolve this there is a nice Laravel package called Trusted Proxy, https://github.com/fideloper/TrustedProxy.

The package allows Laravel to use the X-Forwarded header to create proper urls.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s