defaultAPIRequestSkipper is echo skipper for api requests. /bytebase.v1 covers Connect-go gRPC handlers so unknown gRPC paths return a structured 404 instead of falling through to the SPA's HTML5 fallback (which would return index.html).
(c *echo.Context)
| 65 | // Connect-go gRPC handlers so unknown gRPC paths return a structured 404 instead |
| 66 | // of falling through to the SPA's HTML5 fallback (which would return index.html). |
| 67 | func defaultAPIRequestSkipper(c *echo.Context) bool { |
| 68 | path := c.Request().URL.Path |
| 69 | return common.HasPrefixes(path, "/api", "/v1", "/bytebase.v1", "/.well-known", webhookAPIPrefix) |
| 70 | } |