chore: remove local setAuthCookie
This commit is contained in:
parent
107118febc
commit
4bd2b028b7
14
api/s5/s5.go
14
api/s5/s5.go
|
@ -21,7 +21,6 @@ import (
|
|||
"slices"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"git.lumeweb.com/LumeWeb/portal/api/router"
|
||||
"git.lumeweb.com/LumeWeb/portal/bao"
|
||||
|
@ -2142,19 +2141,6 @@ func isCidManifest(cid *encoding.CID) bool {
|
|||
return slices.Contains(mTypes, cid.Type)
|
||||
}
|
||||
|
||||
func setAuthCookie(jwt string, jc jape.Context) {
|
||||
authCookie := http.Cookie{
|
||||
Name: "s5-auth-token",
|
||||
Value: jwt,
|
||||
Path: "/",
|
||||
HttpOnly: true,
|
||||
MaxAge: int(time.Hour.Seconds() * 24),
|
||||
Secure: true,
|
||||
}
|
||||
|
||||
http.SetCookie(jc.ResponseWriter, &authCookie)
|
||||
}
|
||||
|
||||
func extractMPFilename(header textproto.MIMEHeader) string {
|
||||
cd := header.Get("Content-Disposition")
|
||||
if cd == "" {
|
||||
|
|
Loading…
Reference in New Issue