Skip to content

TypeScript API / laikacms/sanitizer / SanitizeOptions

Interface: SanitizeOptions ​

Options for sanitization

Properties ​

ignoreExtensions? ​

ts
optional ignoreExtensions?: string[];

File extensions to ignore (pass through unchanged without sanitization). Use this when you have other security measures in place for certain file types.

Example: ['pdf', 'jpeg', 'jpg'] - these files will be returned unchanged

WARNING: Use with caution - this bypasses security checks for the specified file types.

Default ​

ts
[]

maxFileSize? ​

ts
optional maxFileSize?: number;

Maximum file size in bytes

Default ​

ts
104857600 (100MB)

Released under the MIT License.