Skip to content

Commit

Permalink
Strip trailing slashes from loki_api_url as this breaks API calls
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisLovering committed Sep 12, 2023
1 parent d082e3e commit 1561d04
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions olli/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ class _LokiConfig(EnvConfig, env_prefix="loki_"):
jobs: list[str]
max_logs: int | None = 5_000

@field_validator("api_url")
@classmethod
def rstrip_api_url(cls, value: str) -> str:
"""Strip trailing slashes from the api_url as this breaks API calls."""
return value.rstrip("/")


LOKI_CONFIG = _LokiConfig()

Expand Down

0 comments on commit 1561d04

Please sign in to comment.