[PR #2279] [CLOSED] Support reverseproxy to dashboard with additional parts in path #4542

Closed
opened 2026-05-05 14:44:03 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fatedier/frp/pull/2279
Author: @YK-Samgo
Created: 3/6/2021
Status: Closed

Base: devHead: dev


📝 Commits (1)

  • 64f2722 assets/frps/static/vendor.js:

📊 Changes

2 files changed (+4 additions, -2 deletions)

View changed files

📝 assets/frps/static/vendor.js (+1 -1)
📝 assets/frps/statik/statik.go (+3 -1)

📄 Description

/api/ -> ../api/
To support reverseproxy to dashboard with additional parts in path.

The dashboard may fail to open with url like this:
https://www.abc.com/frps/static/#/
Because vendor.js call /api/serverinfo as absolute path. In the example, https://www.abc.com/api/serverinfo
Replace /api/ in vendor.js with ../api/ so that it call the api with a workable path. In the example above, it actually calls https://www.abc.com/frps/api/serverinfo, which can be correctly reverse proxyed.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/fatedier/frp/pull/2279 **Author:** [@YK-Samgo](https://github.com/YK-Samgo) **Created:** 3/6/2021 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `dev` --- ### 📝 Commits (1) - [`64f2722`](https://github.com/fatedier/frp/commit/64f27223d9b601fefcbff0df70d6c154fff1228b) assets/frps/static/vendor.js: ### 📊 Changes **2 files changed** (+4 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `assets/frps/static/vendor.js` (+1 -1) 📝 `assets/frps/statik/statik.go` (+3 -1) </details> ### 📄 Description /api/ -> ../api/ To support reverseproxy to dashboard with additional parts in path. The dashboard may fail to open with url like this: https://www.abc.com/frps/static/#/ Because **vendor.js** call **/api/serverinfo** as absolute path. In the example, https://www.abc.com/api/serverinfo Replace **/api/** in **vendor.js** with **../api/** so that it call the api with a workable path. In the example above, it actually calls https://www.abc.com/frps/api/serverinfo, which can be correctly reverse proxyed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 14:44:03 -06:00
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: github-starred/frp#4542
No description provided.