MCPcopy Create free account
hub / github.com/ericls/imgdd / GetBaseURL

Function GetBaseURL

httpserver/common_middleware.go:69–79  ·  view source on GitHub ↗
(c context.Context)

Source from the content-addressed store, hash-verified

67}
68
69func GetBaseURL(c context.Context) *url.URL {
70 r := GetRequest(c)
71 url := &url.URL{
72 Scheme: "http",
73 Host: r.Host,
74 }
75 if IsSecure(r) {
76 url.Scheme = "https"
77 }
78 return url
79}
80
81type loggingEntry struct {
82 Proto string

Callers

nothing calls this directly

Calls 2

GetRequestFunction · 0.85
IsSecureFunction · 0.85

Tested by

no test coverage detected