mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-21 13:07:13 +02:00
proxy: always use https for application callback (#1433)
This commit is contained in:
parent
512dd9093e
commit
0537dd63d4
2 changed files with 4 additions and 2 deletions
|
@ -168,10 +168,11 @@ func getURIStringFromRequest(r *http.Request) (*url.URL, error) {
|
|||
// or inferred from forwarding headers
|
||||
uriString := r.FormValue("uri")
|
||||
if uriString == "" {
|
||||
if r.Header.Get(httputil.HeaderForwardedProto) == "" || r.Header.Get(httputil.HeaderForwardedHost) == "" {
|
||||
if r.Header.Get(httputil.HeaderForwardedHost) == "" {
|
||||
return nil, errors.New("no uri to validate")
|
||||
}
|
||||
uriString = r.Header.Get(httputil.HeaderForwardedProto) + "://" +
|
||||
// Always assume HTTPS for application callback
|
||||
uriString = "https://" +
|
||||
r.Header.Get(httputil.HeaderForwardedHost) +
|
||||
r.Header.Get(httputil.HeaderForwardedURI)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue