Skip to content

Commit b8acc12

Browse files
committed
chore: restrict access to multihost endpoint as an alpha feature
1 parent ad5d396 commit b8acc12

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/backrest/backrest.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,11 @@ func main() {
149149
apiAuthenticationHandler := api.NewAuthenticationHandler(authenticator)
150150

151151
mux := http.NewServeMux()
152+
mux.Handle(v1connect.NewAuthenticationHandler(apiAuthenticationHandler))
152153
if cfg.GetMultihost() != nil {
153154
// alpha feature, only available if the user manually enables it in the config.
154-
mux.Handle(v1connect.NewAuthenticationHandler(apiAuthenticationHandler))
155+
mux.Handle(v1connect.NewBackrestSyncServiceHandler(syncHandler))
155156
}
156-
mux.Handle(v1connect.NewBackrestSyncServiceHandler(syncHandler))
157157
backrestHandlerPath, backrestHandler := v1connect.NewBackrestHandler(apiBackrestHandler)
158158
mux.Handle(backrestHandlerPath, auth.RequireAuthentication(backrestHandler, authenticator))
159159
mux.Handle("/", webui.Handler())

0 commit comments

Comments
 (0)