Skip to content

Commit d4867e2

Browse files
committed
Add user_stats handler back on querier
It moved accidentally to distributor in the single-binary change #1262 Signed-off-by: Bryan Boreham <bryan@weave.works>
1 parent a491c4a commit d4867e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎pkg/cortex/modules.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ func (t *Cortex) initDistributor(cfg *Config) (err error) {
168168
return
169169
}
170170

171-
t.server.HTTP.HandleFunc("/user_stats", t.distributor.UserStatsHandler)
172171
t.server.HTTP.HandleFunc("/all_user_stats", t.distributor.AllUserStatsHandler)
173172
t.server.HTTP.Handle("/api/prom/push", t.httpAuthMiddleware.Wrap(http.HandlerFunc(t.distributor.PushHandler)))
174173
return
@@ -209,6 +208,7 @@ func (t *Cortex) initQuerier(cfg *Config) (err error) {
209208
subrouter.Path("/read").Handler(t.httpAuthMiddleware.Wrap(querier.RemoteReadHandler(queryable)))
210209
subrouter.Path("/validate_expr").Handler(t.httpAuthMiddleware.Wrap(http.HandlerFunc(t.distributor.ValidateExprHandler)))
211210
subrouter.Path("/chunks").Handler(t.httpAuthMiddleware.Wrap(querier.ChunksHandler(queryable)))
211+
subrouter.Path("/user_stats").Handler(middleware.AuthenticateUser.Wrap(http.HandlerFunc(t.distributor.UserStatsHandler)))
212212
return
213213
}
214214

0 commit comments

Comments
 (0)