mirror of
https://github.com/shuaiplus/nodewarden.git
synced 2026-06-20 21:00:41 +00:00
fix: enhance attachment handling and folder deletion logic; improve error responses and rate limiting
This commit is contained in:
@@ -99,6 +99,7 @@ export function createRefreshToken(): string {
|
||||
export interface FileDownloadClaims {
|
||||
cipherId: string;
|
||||
attachmentId: string;
|
||||
jti: string;
|
||||
exp: number;
|
||||
}
|
||||
|
||||
@@ -114,6 +115,7 @@ export async function createFileDownloadToken(
|
||||
const payload: FileDownloadClaims = {
|
||||
cipherId,
|
||||
attachmentId,
|
||||
jti: createRefreshToken(),
|
||||
exp: now + 300, // 5 minutes
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user