refactor: set no cache as default setting
This commit is contained in:
parent
ada6d0503e
commit
7a5173ce7f
1 changed files with 4 additions and 0 deletions
4
main.go
4
main.go
|
|
@ -26,6 +26,10 @@ func main() {
|
|||
}))
|
||||
e.Use(middleware.NewDefaultError())
|
||||
e.Use(middleware.NewDefaultBodyParser())
|
||||
e.Use(func(c *elton.Context) error {
|
||||
c.NoCache()
|
||||
return c.Next()
|
||||
})
|
||||
|
||||
assetFS := middleware.NewEmbedStaticFS(webFS, "web")
|
||||
e.GET("/static/*", middleware.NewStaticServe(assetFS, middleware.StaticServeConfig{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue