mirror of
https://github.com/yhl452493373/frps-panel.git
synced 2026-04-04 06:16:59 +08:00
fix proxy to https issue
This commit is contained in:
@@ -556,6 +556,13 @@ func (c *HandleController) MakeProxyFunc() func(context *gin.Context) {
|
|||||||
res := ProxyResponse{}
|
res := ProxyResponse{}
|
||||||
host := c.CommonInfo.DashboardAddr
|
host := c.CommonInfo.DashboardAddr
|
||||||
port := c.CommonInfo.DashboardPort
|
port := c.CommonInfo.DashboardPort
|
||||||
|
|
||||||
|
if strings.HasPrefix(host, "http://") {
|
||||||
|
host, _ = strings.CutPrefix(host, "http://")
|
||||||
|
} else if strings.HasPrefix(host, "https://") {
|
||||||
|
host, _ = strings.CutPrefix(host, "https://")
|
||||||
|
}
|
||||||
|
|
||||||
requestUrl := protocol + host + ":" + strconv.Itoa(port) + context.Param("serverApi")
|
requestUrl := protocol + host + ":" + strconv.Itoa(port) + context.Param("serverApi")
|
||||||
request, _ := http.NewRequest("GET", requestUrl, nil)
|
request, _ := http.NewRequest("GET", requestUrl, nil)
|
||||||
username := c.CommonInfo.DashboardUser
|
username := c.CommonInfo.DashboardUser
|
||||||
|
|||||||
Reference in New Issue
Block a user