mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-08-07 13:48:29 +02:00
bug fixes for 2.6.5
+ Added potential fixes for #34 and #39 + Added better error handling for #43
This commit is contained in:
@@ -649,6 +649,13 @@ func HandleIncomingPortSet(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
//Check if it is identical as proxy root (recursion!)
|
||||
if dynamicProxyRouter.Root == nil || dynamicProxyRouter.Root.Domain == "" {
|
||||
//Check if proxy root is set before checking recursive listen
|
||||
//Fixing issue #43
|
||||
utils.SendErrorResponse(w, "Proxy root not set")
|
||||
return
|
||||
}
|
||||
|
||||
proxyRoot := strings.TrimSuffix(dynamicProxyRouter.Root.Domain, "/")
|
||||
if strings.HasPrefix(proxyRoot, "localhost:"+strconv.Itoa(newIncomingPortInt)) || strings.HasPrefix(proxyRoot, "127.0.0.1:"+strconv.Itoa(newIncomingPortInt)) {
|
||||
//Listening port is same as proxy root
|
||||
|
Reference in New Issue
Block a user