feat: add metrics

This commit is contained in:
Jonas Kaninda
2024-11-10 17:06:58 +01:00
parent a549e33e9a
commit 00702e138b
7 changed files with 114 additions and 2 deletions

View File

@@ -29,7 +29,7 @@ import (
// ProxyHandler proxies requests to the backend
func (proxyRoute ProxyRoute) ProxyHandler() http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
logger.Info("%s %s %s %s", r.Method, getRealIP(r), r.URL, r.UserAgent())
logger.Info("%s %s %s %s", r.Method, getRealIP(r), r.URL.Path, r.UserAgent())
// Check Method if is allowed
if len(proxyRoute.methods) > 0 {
if !slices.Contains(proxyRoute.methods, r.Method) {