We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e87c582 commit f52af20Copy full SHA for f52af20
runnables/httpserver/middleware/headers/headers.go
@@ -10,6 +10,10 @@ type HeaderMap map[string]string
10
// New creates a middleware that sets HTTP headers on responses.
11
// Headers are set before the request is processed, allowing other middleware
12
// and handlers to override them if needed.
13
+//
14
+// Note: The Go standard library's http package will validate headers when
15
+// writing them to prevent protocol violations. This middleware does not
16
+// perform additional validation beyond what the standard library provides.
17
func New(headers HeaderMap) httpserver.HandlerFunc {
18
return func(rp *httpserver.RequestProcessor) {
19
// Set headers before processing
0 commit comments