File tree Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Original file line number Diff line number Diff line change @@ -35,20 +35,7 @@ func (*FrontendService) Serve(_ context.Context, e *echo.Echo) {
35
35
}
36
36
37
37
// 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 {
52
39
Filesystem : getFileSystem ("dist" ),
53
40
HTML5 : true , // Enable fallback to index.html
54
41
Skipper : apiSkipper ,
You can’t perform that action at this time.
0 commit comments