- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for GetSourceScheme (0.06 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) -
cmd/api-response.go
func getObjectLocation(r *http.Request, domains []string, bucket, object string) string { // unit tests do not have host set. if r.Host == "" { return path.Clean(r.URL.Path) } proto := handlers.GetSourceScheme(r) if proto == "" { proto = getURLScheme(globalIsTLS) } u := &url.URL{ Host: r.Host, Path: path.Join(SlashSeparator, bucket, object), Scheme: proto, }
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Fri Oct 24 04:05:19 UTC 2025 - 35K bytes - Viewed (0)