Skip to content

Commit b46df85

Browse files
committed
docs
1 parent 6a0968c commit b46df85

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

runnables/httpserver/README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,19 @@ Middleware forms a processing pipeline where each step can affect subsequent ste
8181
// Logging captures the actual request after security filtering
8282
// Content headers set last prevent handlers from overriding them
8383

84+
import (
85+
"github.com/robbyt/go-supervisor/runnables/httpserver/middleware/recovery"
86+
"github.com/robbyt/go-supervisor/runnables/httpserver/middleware/headers"
87+
"github.com/robbyt/go-supervisor/runnables/httpserver/middleware/logger"
88+
"github.com/robbyt/go-supervisor/runnables/httpserver/middleware/metrics"
89+
)
90+
8491
middlewares := []httpserver.HandlerFunc{
8592
recovery.New(lgr), // Catches panics - must wrap everything
86-
headersMw.Security(), // Security headers - always applied
93+
headers.Security(), // Security headers - always applied
8794
logger.New(lgr), // Logs what actually gets processed
8895
metrics.New(), // Measures performance
89-
headersMw.JSON(), // Sets content type - easily overridden
96+
headers.JSON(), // Sets content type - easily overridden
9097
}
9198
```
9299

0 commit comments

Comments
 (0)