I have an application that relies on IPV4 addresses. Recently, some requests are returning IPV6 addresses when calling request.remote_addr and that is breaking the app.
Is there any way to force and App Engine (Standard, Python) app to return only IPV4 addresses for remote IP's? Or is there any function to "map" or "project" IPV6 to IPV4? I do know that are different and the first has a higher number of combinations possible, se there is no way to 1-1 conversion.
My app case: We have several users under the same router connected to the WAN (public IP, returned by request.remote_addr property). I need to be able to check if the user request is in the same WAN IP address, I will process it. If the user makes a request outside of the LAN (from his cell phone or home) if the server detect that the remote IP is different, I will block the request.
I am not sure if two users with different local IP addresses under the same router connected to WAN will return the same IPV6 WAN address... If the IPV6 WAN address is the same for any user under the LAN, the app could work without trouble. Or if we can detect if two IPV6 addresses are on the same LAN and with same WAN access, that could also work.
We use other security and authentication techniques, this is only a brief and simple description of a very complex app, and this new feature doesn't have to be perfect.