Added timeout middleware and config.
This commit is contained in:
parent
3a45695083
commit
855d67409f
4 changed files with 13 additions and 10 deletions
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue