rename utils to helpers
This commit is contained in:
parent
4a73b7cc0d
commit
c473e41b45
@ -2,8 +2,8 @@ package auth
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"dk/internal/cookies"
|
"dk/internal/cookies"
|
||||||
|
"dk/internal/helpers"
|
||||||
"dk/internal/session"
|
"dk/internal/session"
|
||||||
"dk/internal/utils"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/valyala/fasthttp"
|
"github.com/valyala/fasthttp"
|
||||||
@ -18,7 +18,7 @@ func SetSessionCookie(ctx *fasthttp.RequestCtx, sessionID string) {
|
|||||||
Path: "/",
|
Path: "/",
|
||||||
Expires: time.Now().Add(session.DefaultExpiration),
|
Expires: time.Now().Add(session.DefaultExpiration),
|
||||||
HTTPOnly: true,
|
HTTPOnly: true,
|
||||||
Secure: utils.IsHTTPS(ctx),
|
Secure: helpers.IsHTTPS(ctx),
|
||||||
SameSite: "lax",
|
SameSite: "lax",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package utils
|
package helpers
|
||||||
|
|
||||||
import "github.com/valyala/fasthttp"
|
import "github.com/valyala/fasthttp"
|
||||||
|
|
@ -6,7 +6,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"dk/internal/database"
|
"dk/internal/database"
|
||||||
"dk/internal/utils/scanner"
|
"dk/internal/helpers/scanner"
|
||||||
|
|
||||||
"zombiezen.com/go/sqlite"
|
"zombiezen.com/go/sqlite"
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user