MCPcopy Create free account
hub / github.com/TomDoesTech/GOTTH / TextHTMLMiddleware

Function TextHTMLMiddleware

internal/middleware/middleware.go:63–68  ·  view source on GitHub ↗
(next http.Handler)

Source from the content-addressed store, hash-verified

61}
62
63func TextHTMLMiddleware(next http.Handler) http.Handler {
64 return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
65 w.Header().Set("Content-Type", "text/html; charset=utf-8")
66 next.ServeHTTP(w, r)
67 })
68}
69
70// get the Nonce from the context, it is a struct called Nonces,
71// so we can get the nonce we need by the key, i.e. HtmxNonce

Callers

nothing calls this directly

Calls 1

ServeHTTPMethod · 0.45

Tested by

no test coverage detected