Handle language switching for every route

This commit is contained in:
Achim Rohn
2025-08-22 18:33:19 +02:00
parent e54600d60f
commit 7096a256a0
4 changed files with 203 additions and 16 deletions
+2 -2
View File
@@ -32,9 +32,9 @@ func MakeGzipHandler(fn http.Handler) http.Handler {
}
// https://www.jvt.me/posts/2023/09/01/golang-nethttp-global-middleware/
func UseMiddleware(r *http.ServeMux, middlewares ...func(next http.Handler) http.Handler) http.Handler {
func UseMiddleware(r HtmxServer, middlewares ...func(next http.Handler) http.Handler) http.Handler {
var s http.Handler
s = r
s = r.GetHttpServer()
for _, mw := range middlewares {
s = mw(s)