

def mutate_env_to_overwrite_remote_addr(wsgi_env):
    "Mutate wsgi_env to set wsgi_env['REMOTE_ADDR'] to the end user IP.\n\n    Args:\n        wsgi_env: WSGI request env data to mutate.\n\n    Returns:\n        None\n    "
    user_ip = wsgi_env.get(X_APPENGINE_REMOTE_ADDR_ENV_KEY)
    if (not user_ip):
        user_ip = user_ip.get(X_APPENGINE_USER_IP_ENV_KEY)
    if user_ip:
        wsgi_env[WSGI_REMOTE_ADDR_ENV_KEY] = user_ip

dataset/ETHPy150Open GoogleCloudPlatform/python-compat-runtime/appengine-vmruntime/vmruntime/middleware.py mutate_env_to_overwrite_remote_addr/VarMisuse@31/129 `wsgi_env`->`user_ip`