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:
@@ -557,11 +557,7 @@ func (c *HandleController) MakeProxyFunc() func(context *gin.Context) {
|
|||||||
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, protocol)
|
||||||
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)
|
||||||
|
|||||||
Reference in New Issue
Block a user