isRemoteResource returns true if resource starts with a scheme or is a protocol-relative URI.
(resource string)
| 226 | // isRemoteResource returns true if resource starts with |
| 227 | // a scheme or is a protocol-relative URI. |
| 228 | func 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 |