Commit d1182354 authored by astaxie's avatar astaxie Committed by GitHub

Merge pull request #2050 from simpleton/bug/original_scheme

fix(context): retrieve scheme from X-Forwarded-Proto when it isn't none
parents a2e63a38 ee262793
......@@ -89,6 +89,9 @@ func (input *BeegoInput) Site() string {
// Scheme returns request scheme as "http" or "https".
func (input *BeegoInput) Scheme() string {
if scheme := input.Header("X-Forwarded-Proto"); scheme != "" {
return scheme
}
if input.Context.Request.URL.Scheme != "" {
return input.Context.Request.URL.Scheme
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment