Conversation
…的 hostname 触发 TLS 证书不 (issue_mojh1bit_4ih8ny)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fe288fedd9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const isExternalDomain = (domain: string) => | ||
| domain.endsWith(".tcloudbase.com") || domain === "tcloudbase.com"; |
There was a problem hiding this comment.
Include custom domains when building accessible gateway URLs
isExternalDomain() now whitelists only *.tcloudbase.com, which drops valid user-bound custom domains (for example api.example.com) returned by getDomainList().ServiceSet. In this same file, listCustomDomains still treats ServiceSet as the custom-domain source, so filtering them out here means queryGateway(action=getAccess) and manageGateway(action=createAccess) can return empty or incomplete urls/primaryUrl even when public access is correctly configured through a custom domain, regressing production setups that rely on non-tcloudbase.com hostnames.
Useful? React with 👍 / 👎.
Attribution post-PR evaluation
Cases
|
Attribution issue
Automation summary
queryGateway(action=getAccess)built URLs from ALL domains returned bygetDomainList(), including the internalDefaultDomain(e.g.{envId}.tcbaccess-in.tencentcloudbase.com) which lacks public TLS certificates. The TLS certificate only covers*.tcloudbase.comdomains. Additionally,manageGateway(action=createAccess)returned no URL at all, leaving agents without the correct externally-accessible URL to share with callers.isExternalDomain()filter that keeps only*.tcloudbase.comdomains (which have valid public TLS certs) and excludes*.tencentcloudbase.cominternal domains. (2)listGatewayDomains()now returns bothdomains(external only, used for URL construction) andallDomains(full list for reference). (3)queryGateway(action=getAccess)returnsurlsanddomainsfrom external domains only, plusallDomainsfor visibility. (4)manageGateway(action=createAccess)now queries the domain list after creating the access entry and returnsurls,primaryUrl, anddomainsso the agent immediately knows the accessible URL without an extra round-trip. (5) Updated tests to use a realistic mock whereDefaultDomainisChanged files
mcp/src/tools/gateway.test.tsmcp/src/tools/gateway.ts