diff options
| author | Hazel K <acomputerdog@gmail.com> | 2024-10-07 21:03:31 -0400 |
|---|---|---|
| committer | Hazelnoot <acomputerdog@gmail.com> | 2024-10-26 09:49:28 -0400 |
| commit | 560ee43dcf2b76cce4b69a449fcd8b9601b7d68d (patch) | |
| tree | c03263ec6e062f4d6ff35abf59dc6703057737a7 /packages/backend/src/config.ts | |
| parent | merge: teach eslint to check translations (!695) (diff) | |
| download | sharkey-560ee43dcf2b76cce4b69a449fcd8b9601b7d68d.tar.gz sharkey-560ee43dcf2b76cce4b69a449fcd8b9601b7d68d.tar.bz2 sharkey-560ee43dcf2b76cce4b69a449fcd8b9601b7d68d.zip | |
separate character limits for local and remote notes
Diffstat (limited to 'packages/backend/src/config.ts')
| -rw-r--r-- | packages/backend/src/config.ts | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/packages/backend/src/config.ts b/packages/backend/src/config.ts index c9411326a9..19f1d6c066 100644 --- a/packages/backend/src/config.ts +++ b/packages/backend/src/config.ts @@ -73,6 +73,9 @@ type Source = { maxFileSize?: number; maxNoteLength?: number; + maxRemoteNoteLength?: number; + maxAltTextLength?: number; + maxRemoteAltTextLength?: number; clusterLimit?: number; @@ -149,6 +152,9 @@ export type Config = { allowedPrivateNetworks: string[] | undefined; maxFileSize: number; maxNoteLength: number; + maxRemoteNoteLength: number; + maxAltTextLength: number; + maxRemoteAltTextLength: number; clusterLimit: number | undefined; id: string; outgoingAddress: string | undefined; @@ -301,6 +307,9 @@ export function loadConfig(): Config { allowedPrivateNetworks: config.allowedPrivateNetworks, maxFileSize: config.maxFileSize ?? 262144000, maxNoteLength: config.maxNoteLength ?? 3000, + maxRemoteNoteLength: config.maxRemoteNoteLength ?? 100000, + maxAltTextLength: config.maxAltTextLength ?? 20000, + maxRemoteAltTextLength: config.maxRemoteAltTextLength ?? 100000, clusterLimit: config.clusterLimit, outgoingAddress: config.outgoingAddress, outgoingAddressFamily: config.outgoingAddressFamily, @@ -475,7 +484,7 @@ function applyEnvOverrides(config: Source) { _apply_top(['sentryForBackend', 'enableNodeProfiling']); _apply_top([['clusterLimit', 'deliverJobConcurrency', 'inboxJobConcurrency', 'relashionshipJobConcurrency', 'deliverJobPerSec', 'inboxJobPerSec', 'relashionshipJobPerSec', 'deliverJobMaxAttempts', 'inboxJobMaxAttempts']]); _apply_top([['outgoingAddress', 'outgoingAddressFamily', 'proxy', 'proxySmtp', 'mediaProxy', 'proxyRemoteFiles', 'videoThumbnailGenerator']]); - _apply_top([['maxFileSize', 'maxNoteLength', 'pidFile']]); + _apply_top([['maxFileSize', 'maxNoteLength', 'maxRemoteNoteLength', 'maxAltTextLength', 'maxRemoteAltTextLength', 'pidFile']]); _apply_top(['import', ['downloadTimeout', 'maxFileSize']]); _apply_top([['signToActivityPubGet', 'checkActivityPubGetSignature']]); } |