diff --git a/proxy/proxymanager.go b/proxy/proxymanager.go index 05e7c14..161b98d 100644 --- a/proxy/proxymanager.go +++ b/proxy/proxymanager.go @@ -51,16 +51,17 @@ func New(config *Config) *ProxyManager { // Start timer start := time.Now() + // capture these because /upstream/:model rewrites them in c.Next() + clientIP := c.ClientIP() + method := c.Request.Method + path := c.Request.URL.Path + // Process request c.Next() // Stop timer duration := time.Since(start) - // Log request details - clientIP := c.ClientIP() - method := c.Request.Method - path := c.Request.URL.Path statusCode := c.Writer.Status() bodySize := c.Writer.Size()