X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/9135a85de4eef32a91c7a3ee0aa405ed454e5a4c..refs/pull/5721/head:/app/Config/app.php diff --git a/app/Config/app.php b/app/Config/app.php index ed73ca612..b96d0bdb7 100644 --- a/app/Config/app.php +++ b/app/Config/app.php @@ -9,6 +9,7 @@ */ use Illuminate\Support\Facades\Facade; +use Illuminate\Support\ServiceProvider; return [ @@ -66,6 +67,15 @@ return [ // Current host and source for the "DRAWIO" setting will be auto-appended to the sources configured. 'iframe_sources' => env('ALLOWED_IFRAME_SOURCES', 'https://*.draw.io https://*.youtube.com https://*.youtube-nocookie.com https://*.vimeo.com'), + // A list of the sources/hostnames that can be reached by application SSR calls. + // This is used wherever users can provide URLs/hosts in-platform, like for webhooks. + // Host-specific functionality (usually controlled via other options) like auth + // or user avatars for example, won't use this list. + // Space seperated if multiple. Can use '*' as a wildcard. + // Values will be compared prefix-matched, case-insensitive, against called SSR urls. + // Defaults to allow all hosts. + 'ssr_hosts' => env('ALLOWED_SSR_HOSTS', '*'), + // Alter the precision of IP addresses stored by BookStack. // Integer value between 0 (IP hidden) to 4 (Full IP usage) 'ip_address_precision' => env('IP_ADDRESS_PRECISION', 4), @@ -74,10 +84,10 @@ return [ 'timezone' => env('APP_TIMEZONE', 'UTC'), // Default locale to use + // A default variant is also stored since Laravel can overwrite + // app.locale when dynamically setting the locale in-app. 'locale' => env('APP_LANG', 'en'), - - // Locales available - 'locales' => ['en', 'ar', 'bg', 'bs', 'ca', 'cs', 'cy', 'da', 'de', 'de_informal', 'el', 'es', 'es_AR', 'et', 'eu', 'fa', 'fr', 'he', 'hr', 'hu', 'id', 'it', 'ja', 'ka', 'ko', 'lt', 'lv', 'nl', 'nb', 'pt', 'pt_BR', 'sk', 'sl', 'sv', 'pl', 'ro', 'ru', 'tr', 'uk', 'uz', 'vi', 'zh_CN', 'zh_TW'], + 'default_locale' => env('APP_LANG', 'en'), // Application Fallback Locale 'fallback_locale' => 'en', @@ -85,9 +95,6 @@ return [ // Faker Locale 'faker_locale' => 'en_GB', - // Enable right-to-left text control. - 'rtl' => false, - // Auto-detect the locale for public users // For public users their locale can be guessed by headers sent by their // browser. This is usually set by users in their browser settings. @@ -107,47 +114,20 @@ return [ ], // Application Service Providers - 'providers' => [ - - // Laravel Framework Service Providers... - Illuminate\Auth\AuthServiceProvider::class, - Illuminate\Broadcasting\BroadcastServiceProvider::class, - Illuminate\Bus\BusServiceProvider::class, - Illuminate\Cache\CacheServiceProvider::class, - Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, - Illuminate\Cookie\CookieServiceProvider::class, - Illuminate\Database\DatabaseServiceProvider::class, - Illuminate\Encryption\EncryptionServiceProvider::class, - Illuminate\Filesystem\FilesystemServiceProvider::class, - Illuminate\Foundation\Providers\FoundationServiceProvider::class, - Illuminate\Hashing\HashServiceProvider::class, - Illuminate\Mail\MailServiceProvider::class, - Illuminate\Notifications\NotificationServiceProvider::class, - Illuminate\Pagination\PaginationServiceProvider::class, - Illuminate\Pipeline\PipelineServiceProvider::class, - Illuminate\Queue\QueueServiceProvider::class, - Illuminate\Redis\RedisServiceProvider::class, - Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, - Illuminate\Session\SessionServiceProvider::class, - Illuminate\Validation\ValidationServiceProvider::class, - Illuminate\View\ViewServiceProvider::class, - + 'providers' => ServiceProvider::defaultProviders()->merge([ // Third party service providers - Barryvdh\DomPDF\ServiceProvider::class, - Barryvdh\Snappy\ServiceProvider::class, - Intervention\Image\ImageServiceProvider::class, SocialiteProviders\Manager\ServiceProvider::class, // BookStack custom service providers - BookStack\Providers\ThemeServiceProvider::class, - BookStack\Providers\AppServiceProvider::class, - BookStack\Providers\AuthServiceProvider::class, - BookStack\Providers\EventServiceProvider::class, - BookStack\Providers\RouteServiceProvider::class, - BookStack\Providers\TranslationServiceProvider::class, - BookStack\Providers\ValidationRuleServiceProvider::class, - BookStack\Providers\ViewTweaksServiceProvider::class, - ], + BookStack\App\Providers\ThemeServiceProvider::class, + BookStack\App\Providers\AppServiceProvider::class, + BookStack\App\Providers\AuthServiceProvider::class, + BookStack\App\Providers\EventServiceProvider::class, + BookStack\App\Providers\RouteServiceProvider::class, + BookStack\App\Providers\TranslationServiceProvider::class, + BookStack\App\Providers\ValidationRuleServiceProvider::class, + BookStack\App\Providers\ViewTweaksServiceProvider::class, + ])->toArray(), // Class Aliases // This array of class aliases to be registered on application start. @@ -155,9 +135,6 @@ return [ // Laravel Packages 'Socialite' => Laravel\Socialite\Facades\Socialite::class, - // Third Party - 'ImageTool' => Intervention\Image\Facades\Image::class, - // Custom BookStack 'Activity' => BookStack\Facades\Activity::class, 'Theme' => BookStack\Facades\Theme::class,