Skip to content

Commit

Permalink
Merge pull request #34 from gravitational/fred/redirect-to-metrics
Browse files Browse the repository at this point in the history
Added redirect for `/` to metrics endpoint
  • Loading branch information
fheinecke authored Mar 21, 2024
2 parents 58d4297 + feb30d3 commit a1ffc96
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Added
- Added workflow Grafana dashboard
- Added redirect from `/` to metrics endpoint at `/metrics`

## [0.0.10] - 2024-03-19
### Added
Expand Down
1 change: 1 addition & 0 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
func RunServer(cfg *CLI) error {
mux := http.NewServeMux()
mux.Handle("GET /metrics", promhttp.Handler())
mux.Handle("GET /", http.RedirectHandler("/metrics", http.StatusPermanentRedirect))
s := http.Server{
Addr: ":8080",
Handler: mux,
Expand Down

0 comments on commit a1ffc96

Please sign in to comment.