location = /ip { default_type text/plain; echo "remote_addr: $remote_addr"; }
if is evil, use try_files. https://www.nginx.com/resources/wiki/start/topics/depth/ifisevil/