Implemented additional check for using the 'X-Forwarded-Port' header.
Merge pull request #836 from akoenig/x-forwarded-port

Implemented additional check for using the 'X-Forwarded-Port' header.