Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

Add a way to use a JWT in an HTTP only cookie

jerebear12d5d9fbb8aa5e
diff --git a/weed/security/jwt.go b/weed/security/jwt.go
index 446c3c21d3..d859e9ea8c 100644
--- a/weed/security/jwt.go
+++ b/weed/security/jwt.go
@@ -83,6 +83,14 @@ func GetJwt(r *http.Request) EncodedJwt {
}
}
+ // Get token from http only cookie
+ if tokenStr == "" {
+ token, err := r.Cookie("AT")
+ if err == nil {
+ tokenStr = token.Value
+ }
+ }
+
return EncodedJwt(tokenStr)
}