Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Middleware ¶
Middleware is a server-side http ware for set headers in tags and/or in context.
Example ¶
mux := http.NewServeMux() mux.HandleFunc("/", handler)
httpServer := &http.Server{ Addr: "0.0.0.0:8080", Handler: http_ctxtags.Middleware("http")( ctxheaders.Middleware( mux, ctxheaders.HeadersToContext(map[string]string{ "X-Site-ID": "x-site-id", }), ), ), }.
Types ¶
Click to show internal directories.
Click to hide internal directories.