--caproverUrl ignores port; cannot deploy to CapRover instances not on 443

未关闭
#153 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
58/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
typescript
领域
cli

调研方向

定位 caprover deploy --caproverUrl 使用的入口点 cleanAdminDomainUrl,并检查输入 URL 的解析和重建方式。验证诸如 https://captain.example.com:8443 这样的 URL 是否保留端口 8443、保留 captain 前缀行为,并连接到提供的端点。

由索引模型根据 Issue 内容生成。

描述

Description

When passing a URL with an explicit port to caprover deploy --caproverUrl, the CLI strips the port and forces a request to port 443. This breaks deployments where CapRover is not exposed on 443.

Example

caprover deploy --caproverUrl https://captain.example.com:8443

Ensuring authentication...
Deploying *** to https://captain.example.com...

Something bad happened: cannot deploy *** at https://captain.example.com.
Expected Behavior

The CLI would respect the provided port (8443) and connect to it.

Actual Behavior

The CLI silently removes the :8443 and connects to https://captain.example.com on port 443.

Justification

CapRover may be deployed behind shared ingress/load balancers, reverse proxies, or on alternate ports, internal environments, or constrained hosting (It's sort of supported). In these setups, CapRover isn’t always a first-class service on 443.

For example, I've been recently deploying a HTTPS load balancing endpoint, using CapRover to deploy it. As a result CapRover has to be moved to a different port (.e.g 8443).

Proposed Solution

Preserve port in cleanAdminDomainUrl:
Parse the input (url.parse), keep hostname and port, enforce 'captain.' prefix if missing, and when rebuilding the URL, append :${port} if present.

主要语言
TypeScript
星标
78
派生
42
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

caprover/caprover-cli 的其他 Issue

查看 caprover/caprover-cli 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。