Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alertmanager: Avoid breaking /api/v1/alerts if legacy prefix is empty #3905

Merged
merged 1 commit into from
Mar 5, 2021
Merged

alertmanager: Avoid breaking /api/v1/alerts if legacy prefix is empty #3905

merged 1 commit into from
Mar 5, 2021

Commits on Mar 4, 2021

  1. alertmanager: Avoid breaking /api/v1/alerts if legacy prefix is empty

    If the legacy prefix is an empty string, it's interpreted as a handler for `/*`. Any handlers added afterwards are silently ignored, so requests to `/api/v1/alerts` are routed to the legacy handler, rather than to `am.*UserConfig` as would be expected. Meanwhile any handlers added BEFORE the `/*` legacy handler still work as expected - making this very difficult to debug!
    
    Signed-off-by: Nick Parker <nick@nickbp.com>
    nickbp committed Mar 4, 2021
    Configuration menu
    Copy the full SHA
    f5ac949 View commit details
    Browse the repository at this point in the history