jss icon indicating copy to clipboard operation
jss copied to clipboard

[NextJS] REST Layout service ip resolving

Open mathijs-b2m opened this issue 1 year ago • 1 comments

Should resolve GeoIP / tracking issues when using REST Layout Service together with next application running in containerized environment.

Description / Motivation

When the REST Layout service is called from the Next application, when running containerized (instead of Vercel or other SWA environments) the x-forwarded-ip header should be forwarded instead of the socket remote address which can belong to a load balancer. Also replaced connection for socket as its deprecated since v16.

Testing Details

The solution should still be tested on other environments so it does not break functionality there.

  • [x] Tested on local Development with traefik / docker.
  • [ ] Tested on Vercel
  • [ ] Test with Azure SWA
  • [ ] Tested on AKS / ingress container

Types of changes

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

mathijs-b2m avatar Jul 28 '23 10:07 mathijs-b2m

@mathijs-b2m Thanks for your report and contribution! I've created a ticket with all the details in our internal backlog to review and merge PR.

illiakovalenko avatar Aug 01 '23 06:08 illiakovalenko