Created
October 4, 2019 09:31
-
-
Save sumanentc/705df765e991e5100aac477c575196d2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Custom Middleware | |
// ServerHeader middleware adds a custom header to the response. | |
func serverHeader(next echo.HandlerFunc) echo.HandlerFunc { | |
return func(c echo.Context) error { | |
c.Response().Header().Set("Custom-Header", "blah!!!") | |
return next(c) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment