Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Simon Pasquier <[email protected]>
  • Loading branch information
bwplotka and simonpasquier authored Oct 26, 2020
1 parent e71658f commit a68cb5c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ This is enforced for any case, whether a label matcher is specified in the origi

### Metadata endpoints

Similar to query endpoint, for metadata endpoints `/api/v1/series`, `/api/v1/labels`, `/api/v1/label/<name>/values` the proxy inject the specified label in the `match` selector.
Similar to query endpoint, for metadata endpoints `/api/v1/series`, `/api/v1/labels`, `/api/v1/label/<name>/values` the proxy injects the specified label in the `match` selector.

NOTE: At the moment of creation `/api/v1/labels`, `/api/v1/label/<name>/values` does not support `match[]` so they are disabled by default. Use `-enable-label-apis` flag to enable
those (see https://github.com/prometheus/prometheus/issues/6178 for tracking development).
Expand Down
2 changes: 1 addition & 1 deletion injectproxy/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func NewRoutes(upstream *url.URL, label string, opts ...Option) *routes {
if opt.enableLabelAPIs {
mux.Handle("/api/v1/labels", enforceMethods(r.matcher, "GET"))
// Full path is /api/v1/label/<label_name>/values but http mux does not support patterns.
// This is fine though as don't care about name for matcher injector.
// This is fine though as we don't care about name for matcher injector.
mux.Handle("/api/v1/label/", enforceMethods(r.matcher, "GET"))
}

Expand Down

0 comments on commit a68cb5c

Please sign in to comment.