Commit a2042ab
authored
Remove trailing slash from pushgateway URLs (#722)
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>1 parent b3541ac commit a2042ab
2 files changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
448 | 448 | | |
449 | 449 | | |
450 | 450 | | |
| 451 | + | |
| 452 | + | |
451 | 453 | | |
452 | 454 | | |
453 | 455 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
369 | 369 | | |
370 | 370 | | |
371 | 371 | | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
372 | 378 | | |
373 | 379 | | |
374 | 380 | | |
| |||
0 commit comments