0

My spring boot application is running in a docker environment. It is managed by docker swarm. I am trying to restrict some of the api to certain apis but the spring security is receiving private ip address instead of public.

I want the application to recieve the public address for the request so that I can use spring security to restrict access apis to certain apis.

If this is not possbile is there another solution to this?

Nischit Pradhan
  • 440
  • 6
  • 18
  • https://stackoverflow.com/questions/9481865/getting-the-ip-address-of-the-current-machine-using-java – pvpkiran Mar 26 '20 at 11:32
  • @pvpkiran This is not related.. I want the ip address of the user and the the server.. – Nischit Pradhan Mar 26 '20 at 11:56
  • as you can see from the answer, it is not possible to get exact ipaddress. That was the point of that post. Check the answer from stephen C in that post – pvpkiran Mar 30 '20 at 09:18

0 Answers0