chore: formatting
This commit is contained in:
@@ -10,9 +10,9 @@ import (
|
|||||||
func AuthMiddleware(svc domain.AuthService) gin.HandlerFunc {
|
func AuthMiddleware(svc domain.AuthService) gin.HandlerFunc {
|
||||||
return func(c *gin.Context) {
|
return func(c *gin.Context) {
|
||||||
// Allow access to login, logout and static assets without authentication
|
// Allow access to login, logout and static assets without authentication
|
||||||
if c.Request.URL.Path == "/login" || c.Request.URL.Path == "/logout" ||
|
if c.Request.URL.Path == "/login" || c.Request.URL.Path == "/logout" ||
|
||||||
len(c.Request.URL.Path) >= 7 && c.Request.URL.Path[:7] == "/static" ||
|
len(c.Request.URL.Path) >= 7 && c.Request.URL.Path[:7] == "/static" ||
|
||||||
len(c.Request.URL.Path) >= 5 && c.Request.URL.Path[:5] == "/dist" {
|
len(c.Request.URL.Path) >= 5 && c.Request.URL.Path[:5] == "/dist" {
|
||||||
c.Next()
|
c.Next()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user