feat: add redirect api

This commit is contained in:
steven
2022-09-30 08:41:35 +08:00
parent 39e00637a3
commit 02619882d1
6 changed files with 65 additions and 2 deletions

View File

@@ -104,7 +104,7 @@ func aclMiddleware(s *Server, next echo.HandlerFunc) echo.HandlerFunc {
}
}
if common.HasPrefixes(path, "/api/workspace/:workspaceName/shortcut/:shortcutName") && c.Request().Method == http.MethodGet {
if common.HasPrefixes(path, "/o/:shortcutName", "/api/workspace/:workspaceName/shortcut/:shortcutName") && c.Request().Method == http.MethodGet {
return next(c)
}