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

@ -28,7 +28,9 @@ func BuildRouter(c *container.Container) {
c.Web.Use(echomw.CSRFWithConfig(echomw.CSRFConfig{
TokenLookup: "form:csrf",
}))
c.Web.Use(echomw.TimeoutWithConfig(echomw.TimeoutConfig{
Timeout: c.Config.App.Timeout,
}))
// Static files with proper cache control
// funcmap.File() should be used in templates to append a cache key to the URL in order to break cache
// after each server restart