[GH-ISSUE #1176] [Bug] v0.4.15版本/api/statistics路径会301重定向到/api/statistics/导致反向代理到子路径时出错 #795

Closed
opened 2026-03-03 01:06:04 +03:00 by kerem · 0 comments
Owner

Originally created by @fcwys on GitHub (Jan 26, 2026).
Original GitHub issue: https://github.com/certimate-go/certimate/issues/1176

Release Version / 软件版本

v0.4.15

Description / 缺陷描述

/api/statistics 路径会301重定向到 /api/statistics/ 导致反向代理到子路径(如 /cert)时出错,导致重定向路径指向 xxx.com/api/statistics/ 而不是 xxx.com/cert/api/statistics/,这个在之前版本没有问题,目前只能增加一条单独的替换规则解决这个问题。

Steps to reproduce / 复现步骤

1、配置nginx到子路径/cert,
2、访问certimate首页
3、工作流统计接口 /api/statistics/ 报错不显示

建议前端地址调整下:https://github.com/certimate-go/certimate/blob/main/ui/src/api/statistics.ts#L9

Logs / 日志

Image Image Image
# Paste logs here / 请在此粘贴日志

Miscellaneous / 其他

No response

Contribution / 贡献代码

  • I am interested in contributing a PR for this! / 我乐意为此提交代码并发起 PR!
Originally created by @fcwys on GitHub (Jan 26, 2026). Original GitHub issue: https://github.com/certimate-go/certimate/issues/1176 ### Release Version / 软件版本 v0.4.15 ### Description / 缺陷描述 `/api/statistics` 路径会301重定向到 `/api/statistics/` 导致反向代理到子路径(如 /cert)时出错,导致重定向路径指向 `xxx.com/api/statistics/` 而不是 `xxx.com/cert/api/statistics/`,这个在之前版本没有问题,目前只能增加一条单独的替换规则解决这个问题。 ### Steps to reproduce / 复现步骤 1、配置nginx到子路径/cert, 2、访问certimate首页 3、工作流统计接口 `/api/statistics/` 报错不显示 建议前端地址调整下:https://github.com/certimate-go/certimate/blob/main/ui/src/api/statistics.ts#L9 ### Logs / 日志 <details> <img width="2175" height="444" alt="Image" src="https://github.com/user-attachments/assets/ec8f7457-3c9d-42ac-9e03-d4db5fbac234" /> <img width="1212" height="132" alt="Image" src="https://github.com/user-attachments/assets/332ebf33-1799-4a2e-a030-3cbb7c83964e" /> <img width="1305" height="480" alt="Image" src="https://github.com/user-attachments/assets/ae44a91e-cd69-44f0-85d8-1a850562d744" /> ```console # Paste logs here / 请在此粘贴日志 ``` </details> ### Miscellaneous / 其他 _No response_ ### Contribution / 贡献代码 - [ ] I am interested in contributing a PR for this! / 我乐意为此提交代码并发起 PR!
kerem 2026-03-03 01:06:04 +03:00
  • closed this issue
  • added the
    bug
    label
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/certimate#795
No description provided.