]> BookStack Code Mirror - bookstack/blob - app/Config/app.php
Make building of search results work for multi-byte encoded characters
[bookstack] / app / Config / app.php
1 <?php
2
3 /**
4  * Global app configuration options.
5  *
6  * Changes to these config files are not supported by BookStack and may break upon updates.
7  * Configuration should be altered via the `.env` file or environment variables.
8  * Do not edit this file unless you're happy to maintain any changes yourself.
9  */
10
11 return [
12
13     // The environment to run BookStack in.
14     // Options: production, development, demo, testing
15     'env' => env('APP_ENV', 'production'),
16
17     // Enter the application in debug mode.
18     // Shows much more verbose error messages. Has potential to show
19     // private configuration variables so should remain disabled in public.
20     'debug' => env('APP_DEBUG', false),
21
22     // The number of revisions to keep in the database.
23     // Once this limit is reached older revisions will be deleted.
24     // If set to false then a limit will not be enforced.
25     'revision_limit' => env('REVISION_LIMIT', 50),
26
27     // The number of days that content will remain in the recycle bin before
28     // being considered for auto-removal. It is not a guarantee that content will
29     // be removed after this time.
30     // Set to 0 for no recycle bin functionality.
31     // Set to -1 for unlimited recycle bin lifetime.
32     'recycle_bin_lifetime' => env('RECYCLE_BIN_LIFETIME', 30),
33
34     // The limit for all uploaded files, including images and attachments in MB.
35     'upload_limit' => env('FILE_UPLOAD_SIZE_LIMIT', 50),
36
37     // Allow <script> tags to entered within page content.
38     // <script> tags are escaped by default.
39     // Even when overridden the WYSIWYG editor may still escape script content.
40     'allow_content_scripts' => env('ALLOW_CONTENT_SCRIPTS', false),
41
42     // Allow server-side fetches to be performed to potentially unknown
43     // and user-provided locations. Primarily used in exports when loading
44     // in externally referenced assets.
45     'allow_untrusted_server_fetching' => env('ALLOW_UNTRUSTED_SERVER_FETCHING', false),
46
47     // Override the default behaviour for allowing crawlers to crawl the instance.
48     // May be ignored if view has be overridden or modified.
49     // Defaults to null since, if not set, 'app-public' status used instead.
50     'allow_robots' => env('ALLOW_ROBOTS', null),
51
52     // Application Base URL, Used by laravel in development commands
53     // and used by BookStack in URL generation.
54     'url' => env('APP_URL', '') === 'http://bookstack.dev' ? '' : env('APP_URL', ''),
55
56     // A list of hosts that BookStack can be iframed within.
57     // Space separated if multiple. BookStack host domain is auto-inferred.
58     'iframe_hosts' => env('ALLOWED_IFRAME_HOSTS', null),
59
60     // Application timezone for back-end date functions.
61     'timezone' => env('APP_TIMEZONE', 'UTC'),
62
63     // Default locale to use
64     'locale' => env('APP_LANG', 'en'),
65
66     // Locales available
67     'locales' => ['en', 'ar', 'bg', 'bs', 'ca', 'cs', 'da', 'de', 'de_informal', 'es', 'es_AR', 'et', 'fa', 'fr', 'he', 'hr', 'hu', 'id', 'it', 'ja', 'ko', 'lt', 'lv', 'nl', 'nb', 'pt', 'pt_BR', 'sk', 'sl', 'sv', 'pl',  'ru', 'th', 'tr', 'uk', 'vi', 'zh_CN', 'zh_TW'],
68
69     //  Application Fallback Locale
70     'fallback_locale' => 'en',
71
72     // Faker Locale
73     'faker_locale' => 'en_GB',
74
75     // Enable right-to-left text control.
76     'rtl' => false,
77
78     // Auto-detect the locale for public users
79     // For public users their locale can be guessed by headers sent by their
80     // browser. This is usually set by users in their browser settings.
81     // If not found the default app locale will be used.
82     'auto_detect_locale' => env('APP_AUTO_LANG_PUBLIC', true),
83
84     // Encryption key
85     'key' => env('APP_KEY', 'AbAZchsay4uBTU33RubBzLKw203yqSqr'),
86
87     // Encryption cipher
88     'cipher' => 'AES-256-CBC',
89
90     // Application Services Provides
91     'providers' => [
92
93         // Laravel Framework Service Providers...
94         Illuminate\Auth\AuthServiceProvider::class,
95         Illuminate\Broadcasting\BroadcastServiceProvider::class,
96         Illuminate\Bus\BusServiceProvider::class,
97         Illuminate\Cache\CacheServiceProvider::class,
98         Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
99         Illuminate\Cookie\CookieServiceProvider::class,
100         Illuminate\Database\DatabaseServiceProvider::class,
101         Illuminate\Encryption\EncryptionServiceProvider::class,
102         Illuminate\Filesystem\FilesystemServiceProvider::class,
103         Illuminate\Foundation\Providers\FoundationServiceProvider::class,
104         Illuminate\Hashing\HashServiceProvider::class,
105         Illuminate\Mail\MailServiceProvider::class,
106         Illuminate\Pipeline\PipelineServiceProvider::class,
107         Illuminate\Queue\QueueServiceProvider::class,
108         Illuminate\Redis\RedisServiceProvider::class,
109         Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
110         Illuminate\Session\SessionServiceProvider::class,
111         Illuminate\Validation\ValidationServiceProvider::class,
112         Illuminate\View\ViewServiceProvider::class,
113         Illuminate\Notifications\NotificationServiceProvider::class,
114         SocialiteProviders\Manager\ServiceProvider::class,
115
116         // Third party service providers
117         Intervention\Image\ImageServiceProvider::class,
118         Barryvdh\DomPDF\ServiceProvider::class,
119         Barryvdh\Snappy\ServiceProvider::class,
120
121         // BookStack replacement service providers (Extends Laravel)
122         BookStack\Providers\PaginationServiceProvider::class,
123         BookStack\Providers\TranslationServiceProvider::class,
124
125         // BookStack custom service providers
126         BookStack\Providers\ThemeServiceProvider::class,
127         BookStack\Providers\AuthServiceProvider::class,
128         BookStack\Providers\AppServiceProvider::class,
129         BookStack\Providers\BroadcastServiceProvider::class,
130         BookStack\Providers\EventServiceProvider::class,
131         BookStack\Providers\RouteServiceProvider::class,
132         BookStack\Providers\CustomFacadeProvider::class,
133         BookStack\Providers\CustomValidationServiceProvider::class,
134     ],
135
136     /*
137     |--------------------------------------------------------------------------
138     | Class Aliases
139     |--------------------------------------------------------------------------
140     |
141     | This array of class aliases will be registered when this application
142     | is started. However, feel free to register as many as you wish as
143     | the aliases are "lazy" loaded so they don't hinder performance.
144     |
145     */
146
147     // Class aliases, Registered on application start
148     'aliases' => [
149         // Laravel
150         'App'          => Illuminate\Support\Facades\App::class,
151         'Arr'          => Illuminate\Support\Arr::class,
152         'Artisan'      => Illuminate\Support\Facades\Artisan::class,
153         'Auth'         => Illuminate\Support\Facades\Auth::class,
154         'Blade'        => Illuminate\Support\Facades\Blade::class,
155         'Bus'          => Illuminate\Support\Facades\Bus::class,
156         'Cache'        => Illuminate\Support\Facades\Cache::class,
157         'Config'       => Illuminate\Support\Facades\Config::class,
158         'Cookie'       => Illuminate\Support\Facades\Cookie::class,
159         'Crypt'        => Illuminate\Support\Facades\Crypt::class,
160         'Date'         => Illuminate\Support\Facades\Date::class,
161         'DB'           => Illuminate\Support\Facades\DB::class,
162         'Eloquent'     => Illuminate\Database\Eloquent\Model::class,
163         'Event'        => Illuminate\Support\Facades\Event::class,
164         'File'         => Illuminate\Support\Facades\File::class,
165         'Gate'         => Illuminate\Support\Facades\Gate::class,
166         'Hash'         => Illuminate\Support\Facades\Hash::class,
167         'Http'         => Illuminate\Support\Facades\Http::class,
168         'Lang'         => Illuminate\Support\Facades\Lang::class,
169         'Log'          => Illuminate\Support\Facades\Log::class,
170         'Mail'         => Illuminate\Support\Facades\Mail::class,
171         'Notification' => Illuminate\Support\Facades\Notification::class,
172         'Password'     => Illuminate\Support\Facades\Password::class,
173         'Queue'        => Illuminate\Support\Facades\Queue::class,
174         'RateLimiter'  => Illuminate\Support\Facades\RateLimiter::class,
175         'Redirect'     => Illuminate\Support\Facades\Redirect::class,
176         // 'Redis'        => Illuminate\Support\Facades\Redis::class,
177         'Request'      => Illuminate\Support\Facades\Request::class,
178         'Response'     => Illuminate\Support\Facades\Response::class,
179         'Route'        => Illuminate\Support\Facades\Route::class,
180         'Schema'       => Illuminate\Support\Facades\Schema::class,
181         'Session'      => Illuminate\Support\Facades\Session::class,
182         'Storage'      => Illuminate\Support\Facades\Storage::class,
183         'Str'          => Illuminate\Support\Str::class,
184         'URL'          => Illuminate\Support\Facades\URL::class,
185         'Validator'    => Illuminate\Support\Facades\Validator::class,
186         'View'         => Illuminate\Support\Facades\View::class,
187
188         // Laravel Packages
189         'Socialite'    => Laravel\Socialite\Facades\Socialite::class,
190
191         // Third Party
192         'ImageTool' => Intervention\Image\Facades\Image::class,
193         'DomPDF'    => Barryvdh\DomPDF\Facade::class,
194         'SnappyPDF' => Barryvdh\Snappy\Facades\SnappyPdf::class,
195
196         // Custom BookStack
197         'Activity'    => BookStack\Facades\Activity::class,
198         'Permissions' => BookStack\Facades\Permissions::class,
199         'Theme'       => BookStack\Facades\Theme::class,
200     ],
201
202     // Proxy configuration
203     'proxies' => env('APP_PROXIES', ''),
204
205 ];