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

Remove trailing slash from pushgateway URLs #722

Merged
merged 1 commit into from
Nov 12, 2021

Conversation

romuald
Copy link
Contributor

@romuald romuald commented Nov 9, 2021

When using the push gateway, URLs may be submitted as host or URL.

When using an URL scheme, in case user submits URL with a trailing slash
(eg: http://localhost:9091/), the pushgateway server will reply with a
301 (or 307 depending on the version) redirect that is not handled by
the default handler. Leading to a traceback

Simply remove any trailing slash from the base URL

When using the push gateway, URLs may be submitted as host or URL.

When using an URL scheme, in case user submits URL with a trailing slash
(eg: `http://localhost:9091/`), the pushgateway server will reply with a
301 (or 307 depending on the version) redirect that is not handled by
the default handler. Leading to a traceback

Simply remove any trailing slash from the base URL

Signed-off-by: Romuald Brunet <romuald@gandi.net>
@romuald romuald force-pushed the push-to-gateway-strip-url branch from b49f903 to 272454d Compare November 9, 2021 17:08
Copy link
Member

@csmarchbanks csmarchbanks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@csmarchbanks csmarchbanks merged commit a2042ab into prometheus:master Nov 12, 2021
@romuald romuald deleted the push-to-gateway-strip-url branch November 13, 2021 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants