{"record":{"id":"37cc28667e1e4938","repo":"larksuite/cli","slug":"invalid-proxy-address-q-path-is-not-allowed","errorCode":null,"errorMessage":"invalid proxy address %q: path is not allowed","messagePattern":"invalid proxy address %q: path is not allowed","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sidecar/protocol.go","lineNumber":177,"sourceCode":"\tif err != nil {\n\t\treturn fmt.Errorf(\"invalid proxy address %q: %w\", addr, err)\n\t}\n\tif u.User != nil {\n\t\treturn fmt.Errorf(\"invalid proxy address %q: userinfo is not allowed\", addr)\n\t}\n\tif u.Scheme == \"https\" {\n\t\treturn fmt.Errorf(\"invalid proxy address %q: use http:// — sidecar is \"+\n\t\t\t\"same-host only (loopback or virtual same-host bridge), so TLS adds \"+\n\t\t\t\"no security; cross-machine deployment is out of scope\", addr)\n\t}\n\tif u.Scheme != \"http\" {\n\t\treturn fmt.Errorf(\"invalid proxy address %q: scheme must be http\", addr)\n\t}\n\tif u.Host == \"\" {\n\t\treturn fmt.Errorf(\"invalid proxy address %q: missing host\", addr)\n\t}\n\tif u.Path != \"\" && u.Path != \"/\" {\n\t\treturn fmt.Errorf(\"invalid proxy address %q: path is not allowed\", addr)\n\t}\n\t// u.Hostname() strips the port and unwraps IPv6 brackets.\n\tif !isSameHost(u.Hostname()) {\n\t\treturn errNotSameHost(addr)\n\t}\n\treturn nil\n}\n\n// ProxyHost extracts the host:port from an AUTH_PROXY URL.\n// Input is expected to be an HTTP URL like \"http://127.0.0.1:16384\".\n// Returns the host:port portion for URL rewriting.\nfunc ProxyHost(authProxy string) string {\n\t// Strip scheme\n\thost := authProxy\n\tif i := strings.Index(host, \"://\"); i >= 0 {\n\t\thost = host[i+3:]\n\t}\n\t// Strip trailing slash","sourceCodeStart":159,"sourceCodeEnd":195,"githubUrl":"https://github.com/larksuite/cli/blob/7fd6ef3c07182257ce776cdc5a614e122d5bd4b3/sidecar/protocol.go#L159-L195","documentation":"Guard in ValidateProxyAddr: the proxy URL contains a path component; proxy addresses must be host:port only with no path.","triggerScenarios":"Thrown at sidecar/protocol.go:177 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a bare http://host:port address without a path"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7fd6ef3c07182257ce776cdc5a614e122d5bd4b3","analyzedAt":"2026-09-04T21:17:44.649Z","contentChangedAt":"2026-09-04T21:17:44.649Z","schemaVersion":2},"datasetVersion":"2026-09-12T02:17:10.037Z"}