forked from mtusi2026/mtusi2026lab5
ЛР 5: асинхронная обработка изображений, уровень 5
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package middleware
|
||||
|
||||
import "github.com/labstack/echo/v4"
|
||||
|
||||
const HeaderInstanceID = "X-Instance-Id"
|
||||
|
||||
func InstanceID(id string) echo.MiddlewareFunc {
|
||||
return func(next echo.HandlerFunc) echo.HandlerFunc {
|
||||
return func(c echo.Context) error {
|
||||
c.Response().Header().Set(HeaderInstanceID, id)
|
||||
return next(c)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user