- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for GetSourceScheme (0.25 sec)
-
internal/handlers/proxy.go
var enableXFFHeader = env.Get("_MINIO_API_XFF_HEADER", config.EnableOn) == config.EnableOn // GetSourceScheme retrieves the scheme from the X-Forwarded-Proto and RFC7239 // Forwarded headers (in that order). func GetSourceScheme(r *http.Request) string { var scheme string // Retrieve the scheme from X-Forwarded-Proto. if proto := r.Header.Get(xForwardedProto); proto != "" {
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Wed Feb 26 19:25:49 UTC 2025 - 5.4K bytes - Viewed (0) -
internal/handlers/proxy_test.go
} for _, v := range headers { req := &http.Request{ Header: http.Header{ v.key: []string{v.val}, }, } res := GetSourceScheme(req) if res != v.expected { t.Errorf("wrong header for %s: got %s want %s", v.key, res, v.expected) } } } // TestGetSourceIP - check the source ip of a request is parsed correctly.Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Wed Feb 26 19:25:49 UTC 2025 - 3.9K bytes - Viewed (0)