- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for IsLocalHost (0.21 sec)
-
cmd/net.go
port = "80" default: return "", "", errors.New("unable to guess port from scheme") } } return host, port, nil } // isLocalHost - checks if the given parameter // correspond to one of the local IP of the // current machine func isLocalHost(host string, port string, localPort string) (bool, error) { hostIPs, err := getHostIP(host) if err != nil { return false, err }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 9.3K bytes - Viewed (0) -
src/cmd/go/internal/web/bootstrap.go
) func get(security SecurityMode, url *urlpkg.URL) (*Response, error) { return nil, errors.New("no http in bootstrap go command") } func openBrowser(url string) bool { return false }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 25 13:00:34 UTC 2022 - 691 bytes - Viewed (0) -
src/net/smtp/auth.go
// error, without sending the credentials. func PlainAuth(identity, username, password, host string) Auth { return &plainAuth{identity, username, password, host} } func isLocalhost(name string) bool { return name == "localhost" || name == "127.0.0.1" || name == "::1" } func (a *plainAuth) Start(server *ServerInfo) (string, []byte, error) { // Must have TLS, or else localhost server.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 10 03:29:50 UTC 2024 - 3.7K bytes - Viewed (0) -
src/cmd/go/internal/web/api.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 25 13:00:34 UTC 2022 - 6.9K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/webhook/client.go
if err != nil { return nil, err } cfg := rest.CopyConfig(restConfig) cfg.Host = u.Scheme + "://" + u.Host cfg.APIPath = u.Path if !isLocalHost(u) { cfg.NextProtos = []string{"http/1.1"} } return complete(cfg) } func isLocalHost(u *url.URL) bool { host := u.Hostname() if strings.EqualFold(host, "localhost") { return true } netIP := netutils.ParseIPSloppy(host)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Jan 04 09:09:10 UTC 2024 - 7.3K bytes - Viewed (0) -
src/cmd/vendor/github.com/google/pprof/internal/driver/webui.go
ln, err := net.Listen("tcp", args.Hostport) if err != nil { return err } isLocal := isLocalhost(args.Host) handler := http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { if isLocal { // Only allow local clients host, _, err := net.SplitHostPort(req.RemoteAddr) if err != nil || !isLocalhost(host) { http.Error(w, "permission denied", http.StatusForbidden) return } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 31 19:48:28 UTC 2024 - 14K bytes - Viewed (0) -
src/net/conf.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat May 18 03:13:26 UTC 2024 - 15.5K bytes - Viewed (0) -
src/cmd/go/internal/web/http.go
Status: http.StatusText(http.StatusOK), StatusCode: http.StatusOK, Body: f, }, nil } func openBrowser(url string) bool { return browser.Open(url) } func isLocalHost(u *urlpkg.URL) bool { // VCSTestRepoURL itself is secure, and it may redirect requests to other // ports (such as a port serving the "svn" protocol) which should also be // considered secure.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Aug 10 17:34:27 UTC 2023 - 9.7K bytes - Viewed (0) -
cmd/endpoint.go
} // UpdateIsLocal - resolves the host and updates if it is local or not. func (endpoint *Endpoint) UpdateIsLocal() (err error) { if endpoint.Host != "" { endpoint.IsLocal, err = isLocalHost(endpoint.Hostname(), endpoint.Port(), globalMinioPort) if err != nil { return err } } return nil } // SetPoolIndex sets a specific pool number to this node
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 34.1K bytes - Viewed (0) -
cmd/admin-bucket-handlers.go
if err = json.Unmarshal(reqBytes, &target); err != nil { writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErrWithErr(ErrAdminConfigBadJSON, err), r.URL) return } sameTarget, _ := isLocalHost(target.URL().Hostname(), target.URL().Port(), globalMinioPort) if sameTarget && bucket == target.TargetBucket { writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrBucketRemoteIdenticalToSource), r.URL) return }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 32.7K bytes - Viewed (0)