MCPcopy Create free account
hub / github.com/modelcontextprotocol/go-sdk / checkHTTPSOrLoopback

Function checkHTTPSOrLoopback

oauthex/oauth2.go:83–95  ·  view source on GitHub ↗
(addr string)

Source from the content-addressed store, hash-verified

81}
82
83func checkHTTPSOrLoopback(addr string) error {
84 if addr == "" {
85 return nil
86 }
87 u, err := url.Parse(addr)
88 if err != nil {
89 return err
90 }
91 if !util.IsLoopback(u.Host) && u.Scheme != "https" {
92 return fmt.Errorf("URL %q does not use HTTPS or is not a loopback address", addr)
93 }
94 return nil
95}

Callers 3

GetAuthServerMetaFunction · 0.85

Calls 1

IsLoopbackFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…