I have a Python 3 app on Google App Engine Standard.
I was using request.remote_addr to get users' IP addresses and it was always returning 127.0.0.1.
I then added werkzeug ProxyFix like this:
from werkzeug.middleware.proxy_fix import ProxyFix
app.wsgi_app = ProxyFix(app.wsgi_app)
I'm also using other middleware to enable cloud ndb:
app.wsgi_app = ndb_wsgi_middleware(app.wsgi_app)
Now request.remote_addr always returns 169.254.1.1 which is a link-local IP address.
Is there a way to fix ProxyFix to get Flask to return the correct IP address?
The X-Forwarded-For header does have the right IP address, but I'd like to get this IP address in request.remote_addr.