MCPcopy
hub / github.com/caddyserver/caddy / isRemoteResource

Function isRemoteResource

modules/caddyhttp/push/handler.go:228–232  ·  view source on GitHub ↗

isRemoteResource returns true if resource starts with a scheme or is a protocol-relative URI.

(resource string)

Source from the content-addressed store, hash-verified

226// isRemoteResource returns true if resource starts with
227// a scheme or is a protocol-relative URI.
228func isRemoteResource(resource string) bool {
229 return strings.HasPrefix(resource, "//") ||
230 strings.HasPrefix(resource, "http://") ||
231 strings.HasPrefix(resource, "https://")
232}
233
234// safeHeaders is a list of header fields that are
235// safe to copy to push requests implicitly. It is

Callers 1

servePreloadLinksMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected