diff --git a/internal/route/http.go b/internal/route/http.go index 614a18f..d470b51 100755 --- a/internal/route/http.go +++ b/internal/route/http.go @@ -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 {