[Bug] Database management links ignore the app's custom Web access address

Offen
#14,288 1 Kommentar 0 Reaktionen 2 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@xiaomeinvG arbeitet bereits daran.

Seit 03.11.2026.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

type: optimization
Contact Information

richbao

1Panel Version

v2.4.2 社区版

Problem Description

在「应用商店」->「已安装」->「phpMyAdmin」的「参数」中,已配置自定义「Web 访问地址」(如 https://pma.example.com)。此时在应用卡片的「跳转」按钮下,可以正确识别并弹出该自定义域名。

但在「数据库」->「MySQL」页面的「管理」下拉菜单中点击「phpMyAdmin」时,前端未读取该应用已保存的「Web 访问地址」,仍然硬编码拼接宿主机 IP 与映射端口(http://<服务器IP>:<映射端口>)。

生产环境下通常会配置反代域名 + 开启强制 HTTPS,并使用防火墙拦截或关闭宿主机的明文端口访问,这导致「数据库」页面的核心快捷入口彻底变成死链(连接超时或拒绝连接)。

Steps to Reproduce
  1. 在 1Panel 应用商店安装 phpMyAdmin,并通过「网站」模块为其创建反向代理站点(绑定二级域名并配置 HTTPS)。
  2. 在宿主机防火墙中关闭或仅允许内网访问 phpMyAdmin 容器映射的明文端口。
  3. 进入「应用商店」->「已安装」->「phpMyAdmin」->「参数配置」,将「Web 访问地址」修改为反代域名(如 https://pma.example.com)并保存。
  4. 返回「应用商店」卡片,鼠标悬停或点击「跳转」按钮,确认自定义访问地址已正常显示。
  5. 前往「数据库」->「MySQL」页面,点击顶部操作栏的「管理」->「phpMyAdmin」。
  6. 观察新标签页打开的地址,依然为 http://<服务器IP>:<映射端口>,而非已配置的自定义域名。
The expected correct result

「数据库」页面「管理」菜单中的 phpMyAdmin/Adminer 跳转链接,逻辑应与应用商店已安装应用的配置保持一致:若检测到该应用设置了自定义「Web 访问地址」,点击时应优先跳转至该自定义地址。

Related log output
无后端报错日志。属于前端跳转路由未读取应用参数中的「Web 访问地址」字段。

【实际行为对比】:
- phpMyAdmin 参数配置中保存的 Web 访问地址:https://pma.example.com
- 应用商店已安装卡片「跳转」弹窗读取的地址:http://<服务器IP>:<映射端口> 与 https://pma.example.com(均可正常显示)
- 数据库「MySQL」页面「管理 -> phpMyAdmin」实际发起的跳转链接:http://<服务器IP>:<映射端口>
Additional Information

建议排查前端页面路由拼接部分:
在数据库管理页面(MySQL / PostgreSQL 等)中,各数据库管理工具的跳转逻辑目前仅使用了 host IP 与 container port 进行拼接,未查询已安装应用中用户自定义填写的外部访问 URL 字段。

Vorherrschende Sprache
Go
Sterne
37.3k
Forks
3.4k
Ø Merge
7 Std. 30 Min.
Gemergte PRs (30 T.)
135

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus 1Panel-dev/1Panel

Alle Issues in 1Panel-dev/1Panel

Ähnliche Issues

Weitere Issues zu Go

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.