Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

chore: remove internal frontend cache

Johnnyd794e6db76e4
diff --git a/server/router/frontend/frontend.go b/server/router/frontend/frontend.go
index b67e0bcc0..3920423b8 100644
--- a/server/router/frontend/frontend.go
+++ b/server/router/frontend/frontend.go
@@ -35,20 +35,7 @@ func (*FrontendService) Serve(_ context.Context, e *echo.Echo) {
}
// Route to serve the main app with HTML5 fallback for SPA behavior.
- e.Use(func(next echo.HandlerFunc) echo.HandlerFunc {
- return func(c echo.Context) error {
- // Skip API routes.
- if apiSkipper(c) {
- return next(c)
- }
- // Skip `/index.html`.
- if c.Path() == "/index.html" {
- return next(c)
- }
- c.Response().Header().Set(echo.HeaderCacheControl, "max-age=31536000, immutable")
- return next(c)
- }
- }, middleware.StaticWithConfig(middleware.StaticConfig{
+ e.Use(middleware.StaticWithConfig(middleware.StaticConfig{
Filesystem: getFileSystem("dist"),
HTML5: true, // Enable fallback to index.html
Skipper: apiSkipper,