Skip to content

Commit

Permalink
Make api root prefix generic
Browse files Browse the repository at this point in the history
Signed-off-by: Brad Davidson <[email protected]>
  • Loading branch information
brandond committed Dec 13, 2024
1 parent 838f446 commit 9c626c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/server/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func router(ctx context.Context, config *Config, cfg *cmds.Server) http.Handler
serverConfig := &config.ControlConfig
nodeAuth := passwordBootstrap(ctx, config)

prefix := "/v1-" + version.Program
prefix := "/{apiroot:v1-[[:alnum:]]+}"
authed := mux.NewRouter().SkipClean(true)
authed.Use(auth.HasRole(serverConfig, version.Program+":agent", user.NodesGroup, bootstrapapi.BootstrapDefaultGroup))
authed.Path(prefix + "/serving-kubelet.crt").Handler(servingKubeletCert(serverConfig, serverConfig.Runtime.ServingKubeletKey, nodeAuth))
Expand Down

0 comments on commit 9c626c9

Please sign in to comment.