Remove redundant UpdateLast RequestTime calls

This commit is contained in:
2025-10-25 16:09:57 +02:00
parent 7d9b983f93
commit c038aac91b
3 changed files with 0 additions and 9 deletions

View File

@@ -94,9 +94,6 @@ func (h *Handler) LlamaCppProxy(onDemandStart bool) http.HandlerFunc {
r.URL.Path = strings.TrimPrefix(r.URL.Path, prefix) r.URL.Path = strings.TrimPrefix(r.URL.Path, prefix)
} }
// Update the last request time for the instance
inst.UpdateLastRequestTime()
proxy.ServeHTTP(w, r) proxy.ServeHTTP(w, r)
} }
} }

View File

@@ -392,9 +392,6 @@ func (h *Handler) ProxyToInstance() http.HandlerFunc {
r.URL.Path = strings.TrimPrefix(r.URL.Path, prefix) r.URL.Path = strings.TrimPrefix(r.URL.Path, prefix)
} }
// Update the last request time for the instance
inst.UpdateLastRequestTime()
// Set forwarded headers // Set forwarded headers
r.Header.Set("X-Forwarded-Host", r.Header.Get("Host")) r.Header.Set("X-Forwarded-Host", r.Header.Get("Host"))
r.Header.Set("X-Forwarded-Proto", "http") r.Header.Set("X-Forwarded-Proto", "http")

View File

@@ -136,9 +136,6 @@ func (h *Handler) OpenAIProxy() http.HandlerFunc {
return return
} }
// Update last request time for the instance
inst.UpdateLastRequestTime()
// Recreate the request body from the bytes we read // Recreate the request body from the bytes we read
r.Body = io.NopCloser(bytes.NewReader(bodyBytes)) r.Body = io.NopCloser(bytes.NewReader(bodyBytes))
r.ContentLength = int64(len(bodyBytes)) r.ContentLength = int64(len(bodyBytes))