Add rack request fix to detect `HTTP_X_FORWARDED_PROTO`

This fixes the rack request port logic to consider the header
`HTTP_X_FORWARDED_PROTO`. This is in the the master branch of
rack but is not in a rolled version yet. This ensures that SSL
forwarding is handled correctly when we redirect in Sinatra
apps.