@@ -6,14 +6,12 @@ package routes
66
77import (
88 "encoding/gob"
9- "path"
109
1110 "code.gitea.io/gitea/models"
1211 "code.gitea.io/gitea/modules/auth"
1312 "code.gitea.io/gitea/modules/context"
1413 "code.gitea.io/gitea/modules/lfs"
1514 "code.gitea.io/gitea/modules/log"
16- "code.gitea.io/gitea/modules/metrics"
1715 "code.gitea.io/gitea/modules/options"
1816 "code.gitea.io/gitea/modules/setting"
1917 "code.gitea.io/gitea/modules/templates"
@@ -43,7 +41,6 @@ import (
4341 "gitea.com/macaron/macaron"
4442 "gitea.com/macaron/session"
4543 "gitea.com/macaron/toolbox"
46- "github.com/prometheus/client_golang/prometheus"
4744 "github.com/tstranex/u2f"
4845)
4946
@@ -978,23 +975,11 @@ func RegisterMacaronRoutes(m *macaron.Macaron) {
978975 private .RegisterRoutes (m )
979976 })
980977
981- m .Get ("/apple-touch-icon.png" , func (ctx * context.Context ) {
982- ctx .Redirect (path .Join (setting .StaticURLPrefix , "img/apple-touch-icon.png" ), 301 )
983- })
984-
985978 // Progressive Web App
986979 m .Get ("/manifest.json" , templates .JSONRenderer (), func (ctx * context.Context ) {
987980 ctx .HTML (200 , "pwa/manifest_json" )
988981 })
989982
990- // prometheus metrics endpoint
991- if setting .Metrics .Enabled {
992- c := metrics .NewCollector ()
993- prometheus .MustRegister (c )
994-
995- m .Get ("/metrics" , routers .Metrics )
996- }
997-
998983 // Not found handler.
999984 m .NotFound (routers .NotFound )
1000985}
0 commit comments