summaryrefslogtreecommitdiff
path: root/robusta_krr
diff options
context:
space:
mode:
Diffstat (limited to 'robusta_krr')
-rw-r--r--robusta_krr/core/models/config.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/robusta_krr/core/models/config.py b/robusta_krr/core/models/config.py
index ac3b15c..aaadaa8 100644
--- a/robusta_krr/core/models/config.py
+++ b/robusta_krr/core/models/config.py
@@ -80,10 +80,12 @@ class Config(pd.BaseSettings):
def validate_prometheus_url(cls, v: Optional[str]):
if v is None:
return None
-
+
if not v.startswith("https://") and not v.startswith("http://"):
raise Exception("--prometheus-url must start with https:// or http://")
-
+
+ v = v.removesuffix("/")
+
return v
@pd.validator("prometheus_other_headers", pre=True)