mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-12-19 22:07:01 +01:00
Add DisableAutoFallback option for proxy endpoints #896
- Added new behavior in upstream random selector (ignore offline check for upstream if there is only one upstream for this proxy rule) - Added config file only DisableAutoFallback option
This commit is contained in:
@@ -152,7 +152,7 @@ func (router *Router) StartProxyService() error {
|
||||
}
|
||||
}
|
||||
|
||||
selectedUpstream, err := router.loadBalancer.GetRequestUpstreamTarget(w, r, sep.ActiveOrigins, sep.UseStickySession)
|
||||
selectedUpstream, err := router.loadBalancer.GetRequestUpstreamTarget(w, r, sep.ActiveOrigins, sep.UseStickySession, sep.DisableAutoFallback)
|
||||
if err != nil {
|
||||
http.ServeFile(w, r, "./web/hosterror.html")
|
||||
router.Option.Logger.PrintAndLog("dprouter", "failed to get upstream for hostname", err)
|
||||
|
||||
Reference in New Issue
Block a user