Skip to content

Commit

Permalink
"sumdbPoxy" ==> "sumdbProxy" (#1569)
Browse files Browse the repository at this point in the history
Co-authored-by: Ted Wexler <[email protected]>
  • Loading branch information
arschles and twexler authored Mar 20, 2020
1 parent e89cf0f commit 94a97fe
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/proxy/actions/app_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func addProxyRoutes(
r.HandleFunc(supportPath, func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(200)
})
sumHandler := sumdbPoxy(sumdbURL, c.NoSumPatterns)
sumHandler := sumdbProxy(sumdbURL, c.NoSumPatterns)
pathPrefix := "/sumdb/" + sumdbURL.Host
r.PathPrefix(pathPrefix + "/").Handler(
http.StripPrefix(pathPrefix, sumHandler),
Expand Down
2 changes: 1 addition & 1 deletion cmd/proxy/actions/sumdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/gomods/athens/pkg/paths"
)

func sumdbPoxy(url *url.URL, nosumPatterns []string) http.Handler {
func sumdbProxy(url *url.URL, nosumPatterns []string) http.Handler {
rp := httputil.NewSingleHostReverseProxy(url)
rp.Director = func(req *http.Request) {
req.Host = url.Host
Expand Down
2 changes: 1 addition & 1 deletion cmd/proxy/actions/sumdb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func TestSumdbProxy(t *testing.T) {
panic(err)
}
pathPrefix := "/sumdb/" + surl.Host
h := sumdbPoxy(surl, nil)
h := sumdbProxy(surl, nil)
h = http.StripPrefix(pathPrefix, h)

targetURL := "/sumdb/" + surl.Host + "/latest"
Expand Down

0 comments on commit 94a97fe

Please sign in to comment.