mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-18 23:33:51 +01:00
fixed loadbalancer panic
This commit is contained in:
@@ -145,8 +145,9 @@ func (r *HTTPRoute) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
||||
func (r *HTTPRoute) addToLoadBalancer() {
|
||||
var lb *loadbalancer.LoadBalancer
|
||||
l, ok := routes.GetHTTPRoute(r.LoadBalance.Link)
|
||||
linked := l.(*HTTPRoute)
|
||||
var linked *HTTPRoute
|
||||
if ok {
|
||||
linked = l.(*HTTPRoute)
|
||||
lb = linked.loadBalancer
|
||||
lb.UpdateConfigIfNeeded(r.LoadBalance)
|
||||
if linked.Raw.Homepage == nil && r.Raw.Homepage != nil {
|
||||
|
||||
Reference in New Issue
Block a user