Skip to content

Commit

Permalink
chore: restrict access to multihost endpoint as an alpha feature
Browse files Browse the repository at this point in the history
  • Loading branch information
garethgeorge committed Jan 8, 2025
1 parent ad5d396 commit b8acc12
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/backrest/backrest.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit b8acc12

Please sign in to comment.