Create navbar and add template globals

This commit is contained in:
William Bouzourène 2024-12-27 17:45:29 +01:00
parent 4be15c2f12
commit 432b01f370
Signed by: bouzoure
SSH key fingerprint: SHA256:19MbXpLua4rUtk8tunMesD8KUKb91LXLHg8E/qTooww
5 changed files with 192 additions and 4 deletions

View file

@ -11,7 +11,7 @@ import (
)
func MfaEnrollMiddleware(c *fiber.Ctx) error {
if c.Path() == "/login" || c.Path() == "/welcome" || strings.HasPrefix(c.Path(), "/totp/") {
if c.Path() == "/login" || c.Path() == "/welcome" || strings.HasPrefix(c.Path(), "/totp/") || c.Path() == "/logout" {
return c.Next()
}
@ -60,7 +60,7 @@ func MfaEnrollMiddleware(c *fiber.Ctx) error {
}
func MfaVerifyMiddleware(c *fiber.Ctx) error {
if c.Path() == "/login" || c.Path() == "/welcome" || strings.HasPrefix(c.Path(), "/totp/") {
if c.Path() == "/login" || c.Path() == "/welcome" || strings.HasPrefix(c.Path(), "/totp/") || c.Path() == "/logout" {
return c.Next()
}