mirror of
https://github.com/lukaszraczylo/traefik-llmgateway.git
synced 2026-10-20 05:56:56 +00:00
fix: harden scaffold after review — manifest drift check, vet-safe logging, panic-path header guard
This commit is contained in:
+4
-3
@@ -125,10 +125,11 @@ func newGateway(ctx context.Context, next http.Handler, config *Config, name str
|
||||
|
||||
// ServeHTTP is the internal router. It grows in later tasks.
|
||||
func (g *Gateway) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
defer recoverPanic(w, g)
|
||||
sw := &statusTrackingWriter{ResponseWriter: w}
|
||||
defer recoverPanic(sw, g)
|
||||
if g.cfg.PassthroughUnknown {
|
||||
g.next.ServeHTTP(w, r)
|
||||
g.next.ServeHTTP(sw, r)
|
||||
return
|
||||
}
|
||||
writeOAIError(w, http.StatusNotFound, "invalid_request_error", "unknown route")
|
||||
writeOAIError(sw, http.StatusNotFound, "invalid_request_error", "unknown route")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user