ЛР 6 — БПИ2302 — Нурлыгаянова — на 3

This commit is contained in:
Nurlygayanova Ekaterina
2026-11-13 11:32:45 +03:00
parent 470d9d6f1e
commit 69a190be0e
164 changed files with 25947 additions and 29 deletions
@@ -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)
}
}
}