feat: optionally gzip large save uploads with fallback (#5259)
* feat: optionally gzip large save uploads with fallback * fix: replace Safari-prone save compression with fflate fallback * refactor: align save upload compression with review feedback * refactor: use compressRequest wrapper for save uploads * Refactor request compression settings * Fix default value * Avoid null in bytes parsing result * fix: switch request compression to fflate gzip * fix: add request compression maxBytes cap and clarify timeout semantics * Refresh package-lock.json * Unify payload limit setting names * Expose compression termination function * Add compression to group chat saves --------- Co-authored-by: Roland4396 <Roland4396@users.noreply.github.com> Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
This commit is contained in:
@@ -202,6 +202,16 @@ performance:
|
||||
memoryCacheCapacity: '100mb'
|
||||
# Enables disk caching for character cards. Improves performances with large card libraries.
|
||||
useDiskCache: true
|
||||
# Configures gzip compression for client requests with large payloads (e.g. settings or chat saves).
|
||||
requestCompression:
|
||||
# Enable request compression.
|
||||
enabled: false
|
||||
# Minimum payload size to trigger compression. Set to 0 to compress all requests regardless of size.
|
||||
minPayloadSize: '256kb'
|
||||
# Hard upper payload size limit for compression. Set to 0 to allow compression of any size.
|
||||
maxPayloadSize: '8mb'
|
||||
# Timeout for request compression in milliseconds.
|
||||
timeout: 4000
|
||||
|
||||
# CACHE BUSTER CONFIGURATION
|
||||
# IMPORTANT: Requires localhost or a domain with HTTPS, otherwise will not work!
|
||||
|
||||
Reference in New Issue
Block a user