refactor: eliminate edge cdn caching layer and update telemetry & assets

This commit is contained in:
2026-10-14 13:21:33 +05:30
parent 69b3666b03
commit 817b506ca3
13 changed files with 61 additions and 583 deletions
+18
View File
@@ -1,6 +1,7 @@
package main
import (
"net/http"
"sync"
"sync/atomic"
"time"
@@ -143,3 +144,20 @@ func init() {
}
}()
}
type trackingResponseWriter struct {
http.ResponseWriter
statusCode int
bytes int64
}
func (w *trackingResponseWriter) WriteHeader(code int) {
w.statusCode = code
w.ResponseWriter.WriteHeader(code)
}
func (w *trackingResponseWriter) Write(b []byte) (int, error) {
n, err := w.ResponseWriter.Write(b)
w.bytes += int64(n)
return n, err
}