Added timeout middleware and config.

This commit is contained in:
mikestefanello 2021-12-06 21:51:21 -05:00
parent 3a45695083
commit 855d67409f
4 changed files with 13 additions and 10 deletions

View file

@ -8,7 +8,7 @@ import (
"goweb/msg"
"goweb/pager"
"github.com/labstack/echo/v4/middleware"
echomw "github.com/labstack/echo/v4/middleware"
"github.com/labstack/echo/v4"
)
@ -53,7 +53,7 @@ func NewPage(c echo.Context) Page {
p.IsHome = p.Path == "/"
if csrf := c.Get(middleware.DefaultCSRFConfig.ContextKey); csrf != nil {
if csrf := c.Get(echomw.DefaultCSRFConfig.ContextKey); csrf != nil {
p.CSRF = csrf.(string)
}