Fixes a IP exposure problem. https://issues.sonatype.org/browse/NEXUS-20956
Use the above code in the server or location block of choice and it should hide the IP address.
Side effect of this at the moment is that all responses will be chunked and the header Transfer-Encoding chunked
will be set.
Requires OpenResty or nginx lua module + dependencies.