-
-
Notifications
You must be signed in to change notification settings - Fork 34
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
I'm using the Bref runtime to run a Symfony application in Lambda with CloudFront in front of it. Getting the source ip address with that layout is hard, esp. because the SymfonyRequestBridge is overriding the proxy configuration when starting up.
While reading the code I was wondering, why the Bridge is using the proxy configuration at all, instead of using the Lambda provided clientIp which already contains the correct value.
By replacing (SymfonyRequestBridge:40)
'REMOTE_ADDR' => '127.0.0.1',
with
'REMOTE_ADDR' => $event->getRequestContext()['http']['sourceIp'],
I was able to fix this issue for me while testing.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working