aboutsummaryrefslogtreecommitdiff
path: root/server.go
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2019-12-03 17:42:33 +0100
committerSimon Ser <contact@emersion.fr>2019-12-03 17:42:33 +0100
commitb7be271560d2c24c9811076a58f8b8c799292659 (patch)
treec34b2045ee8a08d70b03f05ef23ccd663dbe996a /server.go
parentc3fd390b1ab27026246724f02caef3cd2b1205f7 (diff)
downloadalps-b7be271560d2c24c9811076a58f8b8c799292659.tar.gz
alps-b7be271560d2c24c9811076a58f8b8c799292659.zip
Add empty CSS stylesheet
References: https://todo.sr.ht/~sircmpwn/koushin/19
Diffstat (limited to 'server.go')
-rw-r--r--server.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/server.go b/server.go
index 3f521e7..1de4eae 100644
--- a/server.go
+++ b/server.go
@@ -286,7 +286,7 @@ func New(imapURL, smtpURL string) *echo.Echo {
cookie, err := ctx.Cookie(cookieName)
if err == http.ErrNoCookie {
// Require auth for all pages except /login
- if ctx.Path() == "/login" {
+ if ctx.Path() == "/login" || strings.HasPrefix(ctx.Path(), "/assets/") {
return next(ctx)
} else {
return ctx.Redirect(http.StatusFound, "/login")