]> BookStack Code Mirror - bookstack/blob - app/Config/app.php
PDF: Removed barryvdh snappy to use snappy direct
[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 use Illuminate\Support\Facades\Facade;
12 use Illuminate\Support\ServiceProvider;
13
14 return [
15
16     // The environment to run BookStack in.
17     // Options: production, development, demo, testing
18     'env' => env('APP_ENV', 'production'),
19
20     // Enter the application in debug mode.
21     // Shows much more verbose error messages. Has potential to show
22     // private configuration variables so should remain disabled in public.
23     'debug' => env('APP_DEBUG', false),
24
25     // The number of revisions to keep in the database.
26     // Once this limit is reached older revisions will be deleted.
27     // If set to false then a limit will not be enforced.
28     'revision_limit' => env('REVISION_LIMIT', 100),
29
30     // The number of days that content will remain in the recycle bin before
31     // being considered for auto-removal. It is not a guarantee that content will
32     // be removed after this time.
33     // Set to 0 for no recycle bin functionality.
34     // Set to -1 for unlimited recycle bin lifetime.
35     'recycle_bin_lifetime' => env('RECYCLE_BIN_LIFETIME', 30),
36
37     // The limit for all uploaded files, including images and attachments in MB.
38     'upload_limit' => env('FILE_UPLOAD_SIZE_LIMIT', 50),
39
40     // Allow <script> tags to entered within page content.
41     // <script> tags are escaped by default.
42     // Even when overridden the WYSIWYG editor may still escape script content.
43     'allow_content_scripts' => env('ALLOW_CONTENT_SCRIPTS', false),
44
45     // Allow server-side fetches to be performed to potentially unknown
46     // and user-provided locations. Primarily used in exports when loading
47     // in externally referenced assets.
48     'allow_untrusted_server_fetching' => env('ALLOW_UNTRUSTED_SERVER_FETCHING', false),
49
50     // Override the default behaviour for allowing crawlers to crawl the instance.
51     // May be ignored if view has be overridden or modified.
52     // Defaults to null since, if not set, 'app-public' status used instead.
53     'allow_robots' => env('ALLOW_ROBOTS', null),
54
55     // Application Base URL, Used by laravel in development commands
56     // and used by BookStack in URL generation.
57     'url' => env('APP_URL', '') === 'http://bookstack.dev' ? '' : env('APP_URL', ''),
58
59     // A list of hosts that BookStack can be iframed within.
60     // Space separated if multiple. BookStack host domain is auto-inferred.
61     'iframe_hosts' => env('ALLOWED_IFRAME_HOSTS', null),
62
63     // A list of sources/hostnames that can be loaded within iframes within BookStack.
64     // Space separated if multiple. BookStack host domain is auto-inferred.
65     // Can be set to a lone "*" to allow all sources for iframe content (Not advised).
66     // Defaults to a set of common services.
67     // Current host and source for the "DRAWIO" setting will be auto-appended to the sources configured.
68     'iframe_sources' => env('ALLOWED_IFRAME_SOURCES', 'https://*.draw.io https://*.youtube.com https://*.youtube-nocookie.com https://*.vimeo.com'),
69
70     // A list of the sources/hostnames that can be reached by application SSR calls.
71     // This is used wherever users can provide URLs/hosts in-platform, like for webhooks.
72     // Host-specific functionality (usually controlled via other options) like auth
73     // or user avatars for example, won't use this list.
74     // Space seperated if multiple. Can use '*' as a wildcard.
75     // Values will be compared prefix-matched, case-insensitive, against called SSR urls.
76     // Defaults to allow all hosts.
77     'ssr_hosts' => env('ALLOWED_SSR_HOSTS', '*'),
78
79     // Alter the precision of IP addresses stored by BookStack.
80     // Integer value between 0 (IP hidden) to 4 (Full IP usage)
81     'ip_address_precision' => env('IP_ADDRESS_PRECISION', 4),
82
83     // Application timezone for back-end date functions.
84     'timezone' => env('APP_TIMEZONE', 'UTC'),
85
86     // Default locale to use
87     // A default variant is also stored since Laravel can overwrite
88     // app.locale when dynamically setting the locale in-app.
89     'locale' => env('APP_LANG', 'en'),
90     'default_locale' => env('APP_LANG', 'en'),
91
92     //  Application Fallback Locale
93     'fallback_locale' => 'en',
94
95     // Faker Locale
96     'faker_locale' => 'en_GB',
97
98     // Auto-detect the locale for public users
99     // For public users their locale can be guessed by headers sent by their
100     // browser. This is usually set by users in their browser settings.
101     // If not found the default app locale will be used.
102     'auto_detect_locale' => env('APP_AUTO_LANG_PUBLIC', true),
103
104     // Encryption key
105     'key' => env('APP_KEY', 'AbAZchsay4uBTU33RubBzLKw203yqSqr'),
106
107     // Encryption cipher
108     'cipher' => 'AES-256-CBC',
109
110     // Maintenance Mode Driver
111     'maintenance' => [
112         'driver' => 'file',
113         // 'store'  => 'redis',
114     ],
115
116     // Application Service Providers
117     'providers' => ServiceProvider::defaultProviders()->merge([
118         // Third party service providers
119         SocialiteProviders\Manager\ServiceProvider::class,
120
121         // BookStack custom service providers
122         BookStack\App\Providers\ThemeServiceProvider::class,
123         BookStack\App\Providers\AppServiceProvider::class,
124         BookStack\App\Providers\AuthServiceProvider::class,
125         BookStack\App\Providers\EventServiceProvider::class,
126         BookStack\App\Providers\RouteServiceProvider::class,
127         BookStack\App\Providers\TranslationServiceProvider::class,
128         BookStack\App\Providers\ValidationRuleServiceProvider::class,
129         BookStack\App\Providers\ViewTweaksServiceProvider::class,
130     ])->toArray(),
131
132     // Class Aliases
133     // This array of class aliases to be registered on application start.
134     'aliases' => Facade::defaultAliases()->merge([
135         // Laravel Packages
136         'Socialite'    => Laravel\Socialite\Facades\Socialite::class,
137
138         // Custom BookStack
139         'Activity'    => BookStack\Facades\Activity::class,
140         'Theme'       => BookStack\Facades\Theme::class,
141     ])->toArray(),
142
143     // Proxy configuration
144     'proxies' => env('APP_PROXIES', ''),
145
146 ];