2018-09-18 03:03:00 +00:00
|
|
|
package http
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/http"
|
|
|
|
|
|
|
|
"github.com/hashicorp/vault/helper/namespace"
|
|
|
|
"github.com/hashicorp/vault/vault"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
adjustRequest = func(c *vault.Core, r *http.Request) (*http.Request, int) {
|
|
|
|
return r.WithContext(namespace.ContextWithNamespace(r.Context(), namespace.RootNamespace)), 0
|
|
|
|
}
|
|
|
|
|
|
|
|
genericWrapping = func(core *vault.Core, in http.Handler, props *vault.HandlerProperties) http.Handler {
|
|
|
|
// Wrap the help wrapped handler with another layer with a generic
|
|
|
|
// handler
|
2020-05-14 13:19:27 +00:00
|
|
|
return wrapGenericHandler(core, in, props)
|
2018-09-18 03:03:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
additionalRoutes = func(mux *http.ServeMux, core *vault.Core) {}
|
2019-10-11 18:56:59 +00:00
|
|
|
|
|
|
|
nonVotersAllowed = false
|
2018-09-18 03:03:00 +00:00
|
|
|
)
|