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