What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Is there a service in Spryker which provides the IP address of the client from the request?

Options
U02SK9QH76G
U02SK9QH76G Posts: 17 🧑🏻‍🚀 - Cadet
edited February 2022 in Help

Is there a service in Spryker which provides the IP address of the client from the request?

Comments

  • U02SK9QH76G
    U02SK9QH76G Posts: 17 🧑🏻‍🚀 - Cadet
    Options

    No longer needed, I have used the Request class from Symfony:

    Request::createFromGlobals()->getClientIp()
    
  • UK7KBE2JW
    UK7KBE2JW Posts: 463 🧑🏻‍🚀 - Cadet
    Options

    with this it could be possible to get the ip from the load balancer instead of the clients ip. you should use instead something like end($request->getClientIps())

  • U02SK9QH76G
    U02SK9QH76G Posts: 17 🧑🏻‍🚀 - Cadet
    Options

    I don't have the $request at my disposal