fixed output formatting

This commit is contained in:
yusing
2024-03-18 16:00:45 +00:00
parent 3895718d6d
commit 076c19c4ea
10 changed files with 41 additions and 35 deletions

View File

@@ -68,7 +68,7 @@ func NewHTTPRoute(config *ProxyConfig) (*HTTPRoute, error) {
route.Proxy.ModifyResponse = func(r *http.Response) error {
contentType, ok := r.Header["Content-Type"]
if !ok || len(contentType) == 0 {
route.l.Debug("unknown content type for", r.Request.URL.String())
route.l.Debug("unknown content type for ", r.Request.URL.String())
return nil
}
// disable cache
@@ -110,13 +110,6 @@ func NewHTTPRoute(config *ProxyConfig) (*HTTPRoute, error) {
return route, nil
}
func (p *httpLoadBalancePool) Pick() *HTTPRoute {
// round-robin
index := int(p.curentIndex.Load())
defer p.curentIndex.Add(1)
return p.pool[index%len(p.pool)]
}
func (r *HTTPRoute) RemoveFromRoutes() {
httpRoutes.Delete(r.Alias)
}