Added support for X-Forwarded-Proto: header