mirror of
https://github.com/goharbor/harbor.git
synced 2025-02-18 12:51:27 +01:00
- use unified proxy handler to handle all the proxy traffic - define interfaces for the handlers - implement the interface at chart controller level - refactor UT cases - update other related reference code Signed-off-by: Steven Zou <szou@vmware.com>
13 lines
240 B
Go
13 lines
240 B
Go
package chartserver
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
// ProxyTraffic implements the interface method.
|
|
func (c *Controller) ProxyTraffic(w http.ResponseWriter, req *http.Request) {
|
|
if c.trafficProxy != nil {
|
|
c.trafficProxy.ServeHTTP(w, req)
|
|
}
|
|
}
|