Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Using Lift and a custom domain, you need to trust all proxies in order to make it work properly.
This is because Symfony will never see Cloudfront URL because we are using the end client IP here: https://github.com/brefphp/bref/blob/master/src/Event/Http/Psr7Bridge.php#L44
If we set this the
127.0.0.1
instead, it would work for Symfony withtrusted_proxies: 127.0.0.1
. But that will obviously not work for other users expecing this to be the end client IP.We could specify
$_SERVER['REMOTE_ADDR']
to be either the proxy or127.0.0.1
. If so, you would configuretrusted_proxies: 127.0.0.1, REMOTE_ADDR
. See Symfony RequestThe
$_SERVER['REMOTE_ADDR']
is currently undefined.I am not 100% this suggestion is safe, so we should probably use
$_SERVER['REMOTE_ADDR']
, but that also feels wrong. I would be happy to get some input.