Skip to content

Commit

Permalink
Update Request.zep
Browse files Browse the repository at this point in the history
enhance getScheme() function.
  • Loading branch information
zikezhang authored Aug 28, 2024
1 parent 83677f1 commit 6b6574c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions phalcon/Http/Request.zep
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,11 @@ class Request extends AbstractInjectionAware implements RequestInterface, Reques
return "https";
}

let forwarded_proto = this->getServer("HTTP_X_FORWARDED_PROTO");
if forwarded_proto && forwarded_proto == "https" {
return "https";
}

return "http";
}

Expand Down

0 comments on commit 6b6574c

Please sign in to comment.