Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LogRequest ¶
func LogRequest(logger *slog.Logger) echo.MiddlewareFunc
LogRequest is a middleware that logs each request using slog. This is often handled by slog-echo, but we can add custom logic here if needed.
func RequestID ¶
func RequestID() echo.MiddlewareFunc
RequestID returns a middleware that adds a request ID to the request and response. It also adds the request ID to the context for slog.
func SecurityHeaders ¶
func SecurityHeaders(cfg config.SecurityConfig, appEnv string) echo.MiddlewareFunc
SecurityHeaders adds baseline secure defaults, including CSP with request-scoped nonce.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.