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?

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

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

    Request::createFromGlobals()->getClientIp()
    
  • UK7KBE2JW
    UK7KBE2JW Posts: 463 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    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

    I don't have the $request at my disposal