Add empty CSS stylesheet
References: https://todo.sr.ht/~sircmpwn/koushin/19
This commit is contained in:
parent
c3fd390b1a
commit
b7be271560
3 changed files with 3 additions and 1 deletions
1
public/assets/style.css
Normal file
1
public/assets/style.css
Normal file
|
@ -0,0 +1 @@
|
||||||
|
/* TODO */
|
|
@ -4,6 +4,7 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>koushin</title>
|
<title>koushin</title>
|
||||||
|
<link rel="stylesheet" href="/assets/style.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -286,7 +286,7 @@ func New(imapURL, smtpURL string) *echo.Echo {
|
||||||
cookie, err := ctx.Cookie(cookieName)
|
cookie, err := ctx.Cookie(cookieName)
|
||||||
if err == http.ErrNoCookie {
|
if err == http.ErrNoCookie {
|
||||||
// Require auth for all pages except /login
|
// Require auth for all pages except /login
|
||||||
if ctx.Path() == "/login" {
|
if ctx.Path() == "/login" || strings.HasPrefix(ctx.Path(), "/assets/") {
|
||||||
return next(ctx)
|
return next(ctx)
|
||||||
} else {
|
} else {
|
||||||
return ctx.Redirect(http.StatusFound, "/login")
|
return ctx.Redirect(http.StatusFound, "/login")
|
||||||
|
|
Loading…
Reference in a new issue