From my understanding this is options if you only want to accept request from certain IP,
$checkProxyHeaders = true; // Note: Never trust the IP address for security processes!
$trustedProxies = ['10.0.0.1', '10.0.0.2']; // Note: Never trust the IP address for security processes!
$app->add(new RKA\Middleware\IpAddress($checkProxyHeaders, $trustedProxies));
When I add that into my app the output is this,
string(3) "::1" ::1
If I am trying to capture the IP from the request is that $trustedProxies optional? If it is not optional how can I accept request from all IP?
To achieve my goal what am I missing here? Or am I getting the expected result and I just do not realize it?
Maybe I am missing the point. But my goal is to capture any IP from any request made to my rest api so I can keep track of them in a database.
I am using Slim 3 and when I use composer to load the middleware I use it like this and it always returns null from my localhost.
From my understanding this is options if you only want to accept request from certain IP,
When I add that into my app the output is this,
string(3) "::1" ::1
If I am trying to capture the IP from the request is that $trustedProxies optional? If it is not optional how can I accept request from all IP?
To achieve my goal what am I missing here? Or am I getting the expected result and I just do not realize it?