From a39b5c7542ef88d70d47bf3542ac43d669ce8bc4 Mon Sep 17 00:00:00 2001 From: Nick Pillitteri <56quarters@users.noreply.github.com> Date: Wed, 12 Jan 2022 13:59:15 -0500 Subject: [PATCH] Remove mention of Mimir-specific HTTP header (#736) Signed-off-by: Nick Pillitteri --- docs/configuration/config-file-reference.md | 5 ++--- pkg/api/api.go | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/configuration/config-file-reference.md b/docs/configuration/config-file-reference.md index a5aca6c4593..80c53f3de59 100644 --- a/docs/configuration/config-file-reference.md +++ b/docs/configuration/config-file-reference.md @@ -76,9 +76,8 @@ api: # Allows to skip label name validation via header on the http write path. Use # with caution as it breaks PromQL. Allowing this for external clients allows - # any client to send invalid label names. After enabling it, requests with - # X-Mimir-SkipLabelNameValidation HTTP header set to true will not have label - # names validated. + # any client to send invalid label names. After enabling it, requests with a + # specific HTTP header set to true will not have label names validated. # CLI flag: -api.skip-label-name-validation-header-enabled [skip_label_name_validation_header_enabled: | default = false] diff --git a/pkg/api/api.go b/pkg/api/api.go index 2778e27a9b8..44488f0f6dc 100644 --- a/pkg/api/api.go +++ b/pkg/api/api.go @@ -74,7 +74,8 @@ type Config struct { // RegisterFlags adds the flags required to config this to the given FlagSet. func (cfg *Config) RegisterFlags(f *flag.FlagSet) { f.BoolVar(&cfg.ResponseCompression, "api.response-compression-enabled", false, "Use GZIP compression for API responses. Some endpoints serve large YAML or JSON blobs which can benefit from compression.") - f.BoolVar(&cfg.SkipLabelNameValidationHeader, "api.skip-label-name-validation-header-enabled", false, "Allows to skip label name validation via header on the http write path. Use with caution as it breaks PromQL. Allowing this for external clients allows any client to send invalid label names. After enabling it, requests with X-Mimir-SkipLabelNameValidation HTTP header set to true will not have label names validated.") + // TODO(56quarters): Mention the specific header "X-Mimir-SkipLabelNameValidation" after Mimir is public + f.BoolVar(&cfg.SkipLabelNameValidationHeader, "api.skip-label-name-validation-header-enabled", false, "Allows to skip label name validation via header on the http write path. Use with caution as it breaks PromQL. Allowing this for external clients allows any client to send invalid label names. After enabling it, requests with a specific HTTP header set to true will not have label names validated.") cfg.RegisterFlagsWithPrefix("", f) }