Allow heading tags (h1-h6) in ContentSanitizer so news editor headings render
This commit is contained in:
60
config/enhance.php
Normal file
60
config/enhance.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'disk' => env('ENHANCE_DISK', env('FILESYSTEM_DISK', 'public')),
|
||||
|
||||
'source_prefix' => env('ENHANCE_SOURCE_PREFIX', 'enhance/sources'),
|
||||
'output_prefix' => env('ENHANCE_OUTPUT_PREFIX', 'enhance/outputs'),
|
||||
'preview_prefix' => env('ENHANCE_PREVIEW_PREFIX', 'enhance/previews'),
|
||||
|
||||
'default_engine' => env('ENHANCE_ENGINE', 'stub'),
|
||||
|
||||
'max_upload_mb' => (int) env('ENHANCE_MAX_UPLOAD_MB', 20),
|
||||
'max_input_width' => (int) env('ENHANCE_MAX_INPUT_WIDTH', 4096),
|
||||
'max_input_height' => (int) env('ENHANCE_MAX_INPUT_HEIGHT', 4096),
|
||||
'max_output_width' => (int) env('ENHANCE_MAX_OUTPUT_WIDTH', 8192),
|
||||
'max_output_height' => (int) env('ENHANCE_MAX_OUTPUT_HEIGHT', 8192),
|
||||
|
||||
'allowed_mimes' => [
|
||||
'image/jpeg',
|
||||
'image/png',
|
||||
'image/webp',
|
||||
],
|
||||
|
||||
'allowed_modes' => [
|
||||
'standard',
|
||||
'artwork',
|
||||
'photo',
|
||||
'illustration',
|
||||
],
|
||||
|
||||
'allowed_scales' => [2, 4],
|
||||
|
||||
'daily_limit' => (int) env('ENHANCE_DAILY_LIMIT', 10),
|
||||
'queue' => env('ENHANCE_QUEUE', 'default'),
|
||||
|
||||
'lifecycle' => [
|
||||
'completed_expires_after_days' => (int) env('ENHANCE_COMPLETED_EXPIRES_AFTER_DAYS', 30),
|
||||
'failed_expires_after_days' => (int) env('ENHANCE_FAILED_EXPIRES_AFTER_DAYS', 7),
|
||||
'deleted_file_grace_days' => (int) env('ENHANCE_DELETED_FILE_GRACE_DAYS', 1),
|
||||
'cleanup_chunk_size' => (int) env('ENHANCE_CLEANUP_CHUNK_SIZE', 100),
|
||||
],
|
||||
|
||||
'health' => [
|
||||
'stuck_processing_after_minutes' => (int) env('ENHANCE_STUCK_PROCESSING_AFTER_MINUTES', 30),
|
||||
'stuck_queued_after_minutes' => (int) env('ENHANCE_STUCK_QUEUED_AFTER_MINUTES', 60),
|
||||
],
|
||||
|
||||
'stub' => [
|
||||
'show_warning' => filter_var(env('ENHANCE_STUB_SHOW_WARNING', true), FILTER_VALIDATE_BOOL),
|
||||
],
|
||||
|
||||
'external_worker' => [
|
||||
'url' => env('ENHANCE_WORKER_URL'),
|
||||
'timeout' => (int) env('ENHANCE_WORKER_TIMEOUT', 300),
|
||||
'token' => env('ENHANCE_WORKER_TOKEN'),
|
||||
'max_download_mb' => (int) env('ENHANCE_WORKER_MAX_DOWNLOAD_MB', 60),
|
||||
],
|
||||
];
|
||||
@@ -1,166 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Alexusmai\LaravelFileManager\Services\ConfigService\DefaultConfigRepository;
|
||||
use Alexusmai\LaravelFileManager\Services\ACLService\ConfigACLRepository;
|
||||
|
||||
return [
|
||||
|
||||
/**
|
||||
* Set Config repository
|
||||
*
|
||||
* Default - DefaultConfigRepository get config from this file
|
||||
*/
|
||||
'configRepository' => DefaultConfigRepository::class,
|
||||
|
||||
/**
|
||||
* ACL rules repository
|
||||
*
|
||||
* Default - ConfigACLRepository (see rules in - aclRules)
|
||||
*/
|
||||
'aclRepository' => ConfigACLRepository::class,
|
||||
|
||||
//********* Default configuration for DefaultConfigRepository **************
|
||||
|
||||
/**
|
||||
* LFM Route prefix
|
||||
* !!! WARNING - if you change it, you should compile frontend with new prefix(baseUrl) !!!
|
||||
*/
|
||||
'routePrefix' => 'file-manager',
|
||||
|
||||
/**
|
||||
* List of disk names that you want to use
|
||||
* (from config/filesystems)
|
||||
*/
|
||||
'diskList' => ['public'],
|
||||
|
||||
/**
|
||||
* Default disk for left manager
|
||||
*
|
||||
* null - auto select the first disk in the disk list
|
||||
*/
|
||||
'leftDisk' => null,
|
||||
|
||||
/**
|
||||
* Default disk for right manager
|
||||
*
|
||||
* null - auto select the first disk in the disk list
|
||||
*/
|
||||
'rightDisk' => null,
|
||||
|
||||
/**
|
||||
* Default path for left manager
|
||||
*
|
||||
* null - root directory
|
||||
*/
|
||||
'leftPath' => null,
|
||||
|
||||
/**
|
||||
* Default path for right manager
|
||||
*
|
||||
* null - root directory
|
||||
*/
|
||||
'rightPath' => null,
|
||||
|
||||
/**
|
||||
* File manager modules configuration
|
||||
*
|
||||
* 1 - only one file manager window
|
||||
* 2 - one file manager window with directories tree module
|
||||
* 3 - two file manager windows
|
||||
*/
|
||||
'windowsConfig' => 2,
|
||||
|
||||
/**
|
||||
* File upload - Max file size in KB
|
||||
*
|
||||
* null - no restrictions
|
||||
*/
|
||||
'maxUploadFileSize' => null,
|
||||
|
||||
/**
|
||||
* File upload - Allow these file types
|
||||
*
|
||||
* [] - no restrictions
|
||||
*/
|
||||
'allowFileTypes' => [],
|
||||
|
||||
/**
|
||||
* Show / Hide system files and folders
|
||||
*/
|
||||
'hiddenFiles' => true,
|
||||
|
||||
/***************************************************************************
|
||||
* Middleware
|
||||
*
|
||||
* Add your middleware name to array -> ['web', 'auth', 'admin']
|
||||
* !!!! RESTRICT ACCESS FOR NON ADMIN USERS !!!!
|
||||
*/
|
||||
'middleware' => ['web'],
|
||||
|
||||
/***************************************************************************
|
||||
* ACL mechanism ON/OFF
|
||||
*
|
||||
* default - false(OFF)
|
||||
*/
|
||||
'acl' => false,
|
||||
|
||||
/**
|
||||
* Hide files and folders from file-manager if user doesn't have access
|
||||
*
|
||||
* ACL access level = 0
|
||||
*/
|
||||
'aclHideFromFM' => true,
|
||||
|
||||
/**
|
||||
* ACL strategy
|
||||
*
|
||||
* blacklist - Allow everything(access - 2 - r/w) that is not forbidden by the ACL rules list
|
||||
*
|
||||
* whitelist - Deny anything(access - 0 - deny), that not allowed by the ACL rules list
|
||||
*/
|
||||
'aclStrategy' => 'blacklist',
|
||||
|
||||
/**
|
||||
* ACL Rules cache
|
||||
*
|
||||
* null or value in minutes
|
||||
*/
|
||||
'aclRulesCache' => null,
|
||||
|
||||
//********* Default configuration for DefaultConfigRepository END **********
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
* ACL rules list - used for default ACL repository (ConfigACLRepository)
|
||||
*
|
||||
* 1 it's user ID
|
||||
* null - for not authenticated user
|
||||
*
|
||||
* 'disk' => 'disk-name'
|
||||
*
|
||||
* 'path' => 'folder-name'
|
||||
* 'path' => 'folder1*' - select folder1, folder12, folder1/sub-folder, ...
|
||||
* 'path' => 'folder2/*' - select folder2/sub-folder,... but not select folder2 !!!
|
||||
* 'path' => 'folder-name/file-name.jpg'
|
||||
* 'path' => 'folder-name/*.jpg'
|
||||
*
|
||||
* * - wildcard
|
||||
*
|
||||
* access: 0 - deny, 1 - read, 2 - read/write
|
||||
*/
|
||||
'aclRules' => [
|
||||
null => [
|
||||
//['disk' => 'public', 'path' => '/', 'access' => 2],
|
||||
],
|
||||
1 => [
|
||||
//['disk' => 'public', 'path' => 'images/arch*.jpg', 'access' => 2],
|
||||
//['disk' => 'public', 'path' => 'files/*', 'access' => 1],
|
||||
],
|
||||
],
|
||||
|
||||
/**
|
||||
* Enable slugification of filenames of uploaded files.
|
||||
*
|
||||
*/
|
||||
'slugifyNames' => false,
|
||||
];
|
||||
Reference in New Issue
Block a user