Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

Commit

Permalink
Merge pull request #11 from keylockerbv/routes-future-proof
Browse files Browse the repository at this point in the history
Secrets route with /raw and version v1beta
  • Loading branch information
SimonBarendse authored Mar 19, 2019
2 parents 5423612 + 6a0baed commit 00a0401
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/restproxy/rest_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ func NewRESTProxy(client secrethub.Client, host string, port int) ClientProxy {
}

func (p *restProxy) addRoutes(r *mux.Router) {
v1 := r.PathPrefix("/v1/").Subrouter()
v := r.PathPrefix("/v1beta/").Subrouter()

v1.PathPrefix("/secrets/").Handler(
http.StripPrefix("/v1/secrets/", http.HandlerFunc(p.handleSecret)),
v.PathPrefix("/secrets/").Handler(
http.StripPrefix("/v1beta/secrets/raw/", http.HandlerFunc(p.handleSecret)),
)
}

Expand Down

0 comments on commit 00a0401

Please sign in to comment.