diff options
| author | Anhgelus Morhtuuzh <william@herges.fr> | 2025-12-12 19:21:22 +0100 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <william@herges.fr> | 2025-12-12 19:21:22 +0100 |
| commit | a815c291074b454d4bb1a31067cd363c84df1360 (patch) | |
| tree | b04e3e048fdd15caff2c9127d7598b04b47178a7 /backend/router.go | |
| parent | d56090d43c925dbbd22a3e0c3f6d541674a09697 (diff) | |
refactor(frontend): remove JS files
Diffstat (limited to 'backend/router.go')
| -rw-r--r-- | backend/router.go | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/backend/router.go b/backend/router.go index 3e6a39a..3eede92 100644 --- a/backend/router.go +++ b/backend/router.go @@ -19,7 +19,6 @@ import ( const ( Version = "0.4.0" configKey = "config" - isUpdateKey = "is_update" assetsFSKey = "assets_fs" debugKey = "debug" ) @@ -95,16 +94,6 @@ func NewRouter(debug bool, cfg *Config, assets fs.FS) *chi.Mux { next.ServeHTTP(w, r.WithContext(ctx)) }) }) - r.Use(func(next http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - val := false - if r.Header.Get("HX-Request") == "true" { - val = true - } - ctx := context.WithValue(r.Context(), isUpdateKey, val) - next.ServeHTTP(w, r.WithContext(ctx)) - }) - }) return r } |
