If the proxy decides not to forward the client's IP, there nothing you can do save locking the user out.