feat(typedserver): Add configurable response compression (Brotli + Gzip) with defaults enabled and documentation
This commit is contained in:
@@ -25,6 +25,8 @@ export interface IUtilityWebsiteServerConstructorOptions {
|
||||
port?: number;
|
||||
/** ads.txt entries (only served if configured) */
|
||||
adsTxt?: string[];
|
||||
/** Response compression configuration (default: enabled with brotli + gzip) */
|
||||
compression?: plugins.smartserve.ICompressionConfig | boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -67,6 +69,9 @@ export class UtilityWebsiteServer {
|
||||
forceSsl: this.options.forceSsl ?? false,
|
||||
securityHeaders: this.options.securityHeaders,
|
||||
|
||||
// Compression
|
||||
compression: this.options.compression,
|
||||
|
||||
// PWA manifest
|
||||
manifest: {
|
||||
name: this.options.domain,
|
||||
|
||||
Reference in New Issue
Block a user