mirror of
https://github.com/garethgeorge/backrest.git
synced 2026-08-28 03:46:29 +00:00
chore: restrict access to multihost endpoint as an alpha feature
This commit is contained in:
@@ -149,11 +149,11 @@ func main() {
|
||||
apiAuthenticationHandler := api.NewAuthenticationHandler(authenticator)
|
||||
|
||||
mux := http.NewServeMux()
|
||||
mux.Handle(v1connect.NewAuthenticationHandler(apiAuthenticationHandler))
|
||||
if cfg.GetMultihost() != nil {
|
||||
// alpha feature, only available if the user manually enables it in the config.
|
||||
mux.Handle(v1connect.NewAuthenticationHandler(apiAuthenticationHandler))
|
||||
mux.Handle(v1connect.NewBackrestSyncServiceHandler(syncHandler))
|
||||
}
|
||||
mux.Handle(v1connect.NewBackrestSyncServiceHandler(syncHandler))
|
||||
backrestHandlerPath, backrestHandler := v1connect.NewBackrestHandler(apiBackrestHandler)
|
||||
mux.Handle(backrestHandlerPath, auth.RequireAuthentication(backrestHandler, authenticator))
|
||||
mux.Handle("/", webui.Handler())
|
||||
|
||||
Reference in New Issue
Block a user