MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / MetaURLOrigin

Function MetaURLOrigin

monitoring/meta.go:36–42  ·  view source on GitHub ↗

MetaURLOrigin extracts the origin (scheme + host) from a URL for metadata purposes.

(fullURL string)

Source from the content-addressed store, hash-verified

34
35// MetaURLOrigin extracts the origin (scheme + host) from a URL for metadata purposes.
36func MetaURLOrigin(fullURL string) string {
37 if u, err := url.Parse(fullURL); err == nil {
38 return u.Scheme + "://" + u.Host
39 }
40
41 return ""
42}

Callers 2

newRequestMethod · 0.92
startMonitoringSpanMethod · 0.92

Calls 1

ParseMethod · 0.80

Tested by

no test coverage detected