add X-Forwarded-Proto default proxy header
remove lots of useless newlines in templates