better dev runner, bug fixes, design changes, and more

This commit is contained in:
Zoe
2024-09-11 00:57:33 -05:00
parent 70a9bcd904
commit 1fb4c71b2b
14 changed files with 377 additions and 81 deletions

View File

@@ -20,6 +20,12 @@ var authenticatedPages = []string{
func AuthCheckMiddleware(next echo.HandlerFunc) echo.HandlerFunc {
return func(c echo.Context) error {
path := c.Request().URL.Path
// bypass auth checks for static and dev resources
if strings.HasPrefix(path, "/_nuxt/") || strings.HasSuffix(path, ".js") || strings.HasSuffix(path, ".css") {
return next(c)
}
_, cookieErr := c.Cookie("sessionToken")
authenticated := cookieErr == nil