mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
Satisfy aws:SecureTransport
policy behind reverse proxy
This commit is contained in:
parent
380233d646
commit
61bd861a42
@ -125,10 +125,15 @@ func getConditionValues(r *http.Request, lc string, cred auth.Credentials) map[s
|
|||||||
authtype = "POST"
|
authtype = "POST"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
secureTransport := r.TLS != nil
|
||||||
|
if forwardedScheme := handlers.GetSourceScheme(r); forwardedScheme != "" {
|
||||||
|
secureTransport = forwardedScheme == "https"
|
||||||
|
}
|
||||||
|
|
||||||
args := map[string][]string{
|
args := map[string][]string{
|
||||||
"CurrentTime": {currTime.Format(time.RFC3339)},
|
"CurrentTime": {currTime.Format(time.RFC3339)},
|
||||||
"EpochTime": {strconv.FormatInt(currTime.Unix(), 10)},
|
"EpochTime": {strconv.FormatInt(currTime.Unix(), 10)},
|
||||||
"SecureTransport": {strconv.FormatBool(r.TLS != nil)},
|
"SecureTransport": {strconv.FormatBool(secureTransport)},
|
||||||
"SourceIp": {handlers.GetSourceIPRaw(r)},
|
"SourceIp": {handlers.GetSourceIPRaw(r)},
|
||||||
"UserAgent": {r.UserAgent()},
|
"UserAgent": {r.UserAgent()},
|
||||||
"Referer": {r.Referer()},
|
"Referer": {r.Referer()},
|
||||||
|
Loading…
Reference in New Issue
Block a user