mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
refactor: impl part of grpcweb
This commit is contained in:
@ -7,6 +7,7 @@ import (
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/labstack/echo/v4/middleware"
|
||||
"github.com/usememos/memos/common/util"
|
||||
)
|
||||
|
||||
//go:embed dist
|
||||
@ -43,3 +44,8 @@ func embedFrontend(e *echo.Echo) {
|
||||
Filesystem: getFileSystem("dist/assets"),
|
||||
}))
|
||||
}
|
||||
|
||||
func defaultAPIRequestSkipper(c echo.Context) bool {
|
||||
path := c.Request().URL.Path
|
||||
return util.HasPrefixes(path, "/api", "/memos.api.v2")
|
||||
}
|
||||
|
Reference in New Issue
Block a user