Skip serving cached page if the user is logged in or the request is not a GET.

This commit is contained in:
mikestefanello 2021-12-19 13:01:52 -05:00
parent 3ad6a5f87f
commit 098d1b7eb2
2 changed files with 15 additions and 2 deletions

View file

@ -51,7 +51,7 @@ func BuildRouter(c *services.Container) {
echomw.TimeoutWithConfig(echomw.TimeoutConfig{
Timeout: c.Config.App.Timeout,
}),
middleware.PageCache(c.Cache),
middleware.ServeCachedPage(c.Cache),
session.Middleware(sessions.NewCookieStore([]byte(c.Config.App.EncryptionKey))),
echomw.CSRFWithConfig(echomw.CSRFConfig{
TokenLookup: "form:csrf",