Skip to content

Trusted Proxies doesn't seem to work with these headers #41598

Discussion options

You must be logged in to vote

Ok, I was on the right track - it was all to do with the X-Forwarded headers.

If you want this to work out of the box, you must ensure that your reverse proxy, load balancer, or whatever, is sending headers Laravel/Symfony is expecting. I already had X-Forwarded-For and X-Forwarded-Host, but needed to add X-Forwarded-Proto and X-Forwarded-Port. I actually cheated and added these by enabling mod_headers in apache and appending these with default values in the vhost. I will be getting the IT lads to add these in whatever-we-use-that-does-this-stuff thingy.

I've also removed forceScheme and all is working well.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by MartinHughes-BPC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant