add modified snippet for reverse proxy, remove old hacks.