Skip serving cached page if the user is logged in or the request is not a GET.
This commit is contained in:
parent
3ad6a5f87f
commit
098d1b7eb2
2 changed files with 15 additions and 2 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue