mirror of
https://github.com/shuaiplus/nodewarden.git
synced 2026-11-09 02:50:20 +00:00
fix: enhance attachment handling and folder deletion logic; improve error responses and rate limiting
This commit is contained in:
1 parent
fff2b149e9
commit
c53819e178
9 files changed
+166
-52
No files matched your search
@@ -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