Support the X-Forwarded-Proto header

http://en.wikipedia.org/wiki/List_of_HTTP_header_fields

Loosely related to: #4615