Home > Back-end >  Have bosses know nginx -> gateway -> service micro service how to get the real request IP
Have bosses know nginx -> gateway -> service micro service how to get the real request IP

Time:09-16

Using ServerHttpRequest SpringGateway components,
So have a try from X-ray forwarded - for, the Proxy - the Client - IP, WL - Proxy - the Client - IP position such as acquisition, also apply to,
My idea is from the first gateway IP Settings to ServerHttpRequest, micro follow-up services to obtain from the Request, but I don't know how to put ServerHttpRequest,,,, or there are other more elegant way directly from micro to get IP in the service

CodePudding user response:

Nginx is certainly on the header passed, this according to the standards.
If he entered into his system, it can get a context to relay this information, specific implementation or what frame of reference for you to use.

Search engines generally will search XXX framework context parameter passing
  • Related