diff options
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 } |
