Skip to content

Commit d794e6d

Browse files
authored
chore: remove internal frontend cache
1 parent 81e40d9 commit d794e6d

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

server/router/frontend/frontend.go

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,7 @@ func (*FrontendService) Serve(_ context.Context, e *echo.Echo) {
3535
}
3636

3737
// Route to serve the main app with HTML5 fallback for SPA behavior.
38-
e.Use(func(next echo.HandlerFunc) echo.HandlerFunc {
39-
return func(c echo.Context) error {
40-
// Skip API routes.
41-
if apiSkipper(c) {
42-
return next(c)
43-
}
44-
// Skip `/index.html`.
45-
if c.Path() == "/index.html" {
46-
return next(c)
47-
}
48-
c.Response().Header().Set(echo.HeaderCacheControl, "max-age=31536000, immutable")
49-
return next(c)
50-
}
51-
}, middleware.StaticWithConfig(middleware.StaticConfig{
38+
e.Use(middleware.StaticWithConfig(middleware.StaticConfig{
5239
Filesystem: getFileSystem("dist"),
5340
HTML5: true, // Enable fallback to index.html
5441
Skipper: apiSkipper,

0 commit comments

Comments
 (0)