mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-06-03 06:07:20 +02:00
Quick fix on the edit not working bug
This commit is contained in:
parent
5e7599756f
commit
d187124db6
@ -346,6 +346,7 @@ func ReverseProxyHandleEditEndpoint(w http.ResponseWriter, r *http.Request) {
|
||||
RequireBasicAuth: requireBasicAuth,
|
||||
BasicAuthCredentials: targetProxyEntry.BasicAuthCredentials,
|
||||
}
|
||||
dynamicProxyRouter.RemoveProxy("vdir", thisOption.RootName)
|
||||
dynamicProxyRouter.AddVirtualDirectoryProxyService(&thisOption)
|
||||
|
||||
} else if eptype == "subd" {
|
||||
@ -357,6 +358,7 @@ func ReverseProxyHandleEditEndpoint(w http.ResponseWriter, r *http.Request) {
|
||||
RequireBasicAuth: requireBasicAuth,
|
||||
BasicAuthCredentials: targetProxyEntry.BasicAuthCredentials,
|
||||
}
|
||||
dynamicProxyRouter.RemoveProxy("subd", thisOption.MatchingDomain)
|
||||
dynamicProxyRouter.AddSubdomainRoutingService(&thisOption)
|
||||
}
|
||||
|
||||
@ -371,14 +373,6 @@ func ReverseProxyHandleEditEndpoint(w http.ResponseWriter, r *http.Request) {
|
||||
BasicAuthCredentials: targetProxyEntry.BasicAuthCredentials,
|
||||
}
|
||||
SaveReverseProxyConfig(&thisProxyConfigRecord)
|
||||
|
||||
//Update the current running config
|
||||
targetProxyEntry.Domain = endpoint
|
||||
targetProxyEntry.RequireTLS = useTLS
|
||||
targetProxyEntry.SkipCertValidations = skipTlsValidation
|
||||
targetProxyEntry.RequireBasicAuth = requireBasicAuth
|
||||
dynamicProxyRouter.SaveProxy(eptype, targetProxyEntry.RootOrMatchingDomain, targetProxyEntry)
|
||||
|
||||
utils.SendOK(w)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user