/
default.php
executable file
·382 lines (365 loc) · 15.2 KB
/
default.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
<?php
/*
* UserFrosting (http://www.userfrosting.com)
*
* @link https://github.com/userfrosting/UserFrosting
* @copyright Copyright (c) 2019 Alexander Weissman
* @license https://github.com/userfrosting/UserFrosting/blob/master/LICENSE.md (MIT License)
*/
/*
* Core configuration file for UserFrosting. You must override/extend this in your site's configuration file.
*
* Sensitive credentials should be stored in an environment variable or your .env file.
* Database password: DB_PASSWORD
* SMTP server password: SMTP_PASSWORD
*/
return [
/*
* ----------------------------------------------------------------------
* Address Book
* ----------------------------------------------------------------------
* Admin is the one sending email from the system. You can set the sender
* email adress and name using this config.
*/
'address_book' => [
'admin' => [
'email' => env('SMTP_USER'),
'name' => 'Site Administrator',
],
],
/*
* ----------------------------------------------------------------------
* Alert Service Config
* ----------------------------------------------------------------------
* Alerts can be stored in the session, or cache system. Switch to the
* cache system if you experience issue with persistent alerts.
*/
'alert' => [
'storage' => 'session', // Supported storage : `session`, `cache`
'key' => 'site.alerts', // the key to use to store flash messages
],
/*
* ----------------------------------------------------------------------
* Assets Service Config
* ----------------------------------------------------------------------
* `use_raw` defines if raw or compiled assets are served. Set to false
* in production mode, so compiled assets can be served
*/
'assets' => [
'compiled' => [
'path' => 'assets',
'schema' => 'bundle.result.json',
],
'raw' => [
'path' => 'assets-raw',
'schema' => 'asset-bundles.json',
],
'use_raw' => true,
],
/*
* ----------------------------------------------------------------------
* Cache Service Config
* ----------------------------------------------------------------------
* Redis & Memcached driver configuration
* See Laravel for more info : https://laravel.com/docs/5.8/cache
*
* Edit prefix to something unique when multiple instance of memcached /
* redis are used on the same server.
*/
'cache' => [
'driver' => 'file', // Supported drivers : `file`, `memcached`, `redis`
'prefix' => 'userfrosting',
'memcached' => [
'host' => '127.0.0.1',
'port' => 11211,
'weight' => 100,
],
'redis' => [
'host' => '127.0.0.1',
'password' => null,
'port' => 6379,
'database' => 0,
],
// Cache twig file to disk
'twig' => false,
],
/*
* ----------------------------------------------------------------------
* CSRF middleware settings
* ----------------------------------------------------------------------
* See https://github.com/slimphp/Slim-Csrf
* Note : CSRF Middleware should only be disabled for dev or debug purposes.
*/
'csrf' => [
'enabled' => env('CSRF_ENABLED', true),
'name' => 'csrf',
'storage_limit' => 200,
'strength' => 16,
'persistent_token' => true,
'blacklist' => [
// A list of url paths to ignore CSRF checks on
// URL paths will be matched against each regular expression in this list.
// Each regular expression should map to an array of methods.
// Regular expressions will be delimited with ~ in preg_match, so if you
// have routes with ~ in them, you must escape this character in your regex.
// Also, remember to use ^ when you only want to match the beginning of a URL path!
],
],
/*
* ----------------------------------------------------------------------
* Database Config
* ----------------------------------------------------------------------
* Settings for the default database connections. Actual config values
* should be store in environment variables
*
* Multiple connections can also be used.
* See Laravel docs : https://laravel.com/docs/5.8/database
*/
'db' => [
'default' => [
'driver' => env('DB_DRIVER', 'mysql'),
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT'),
'database' => env('DB_NAME'),
'username' => env('DB_USER'),
'password' => env('DB_PASSWORD'),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
],
],
/*
* ----------------------------------------------------------------------
* Debug Configuration
* ----------------------------------------------------------------------
* Turn any of those on to help debug your app
*/
'debug' => [
'deprecation' => true,
'queries' => false,
'smtp' => false,
'twig' => false,
],
/*
* ----------------------------------------------------------------------
* Filesystem Configuration
* ----------------------------------------------------------------------
* You may configure as many filesystem "disks" as you wish, and you
* may even configure multiple disks of the same driver. You may also
* select the default filesystem disk that should be used by UserFrosting.
*
* Supported Drivers for disk: "local", "ftp", "sftp", "s3", "rackspace"
*/
'filesystems' => [
'default' => env('FILESYSTEM_DRIVER', 'local'),
'cloud' => env('FILESYSTEM_CLOUD', 's3'),
'disks' => [
/*
* Default storage disk. Default path is `app/storage/`. All
* files are accessible throught the FilesystemManager, but not
* publicly accessible throught an URL. Can still be downloaded
* using the `download` method in a custom controller
*/
'local' => [
'driver' => 'local',
'root' => \UserFrosting\STORAGE_DIR,
],
/*
* Public files are directly accessible throught the webserver for
* better performances, but at the expanse of all files being public.
* Direct access from http://{url}/files/, physically located in `/public/files`
* Great storage disk for assets (images, avatar, etc).
*/
'public' => [
'driver' => 'local',
'root' => \UserFrosting\STORAGE_PUBLIC_DIR,
'url' => 'files/',
],
/*
* Amazon S3 Bucket Config. Config should go in .env file. For help, see :
* https://aws.amazon.com/en/blogs/security/wheres-my-secret-access-key/
*
* As of version 4.3, https://github.com/thephpleague/flysystem-aws-s3-v3
* is required inside a custom Sprinkle to use this filesystem.
*
* Include thephpleague/flysystem-aws-s3-v3 in a custom Sprinkle to use.
*/
's3' => [
'driver' => 's3',
'key' => env('AWS_ACCESS_KEY_ID', ''),
'secret' => env('AWS_SECRET_ACCESS_KEY', ''),
'region' => env('AWS_DEFAULT_REGION', ''), // See : http://docs.aws.amazon.com/general/latest/gr/rande.html
'bucket' => env('AWS_BUCKET', ''),
'url' => env('AWS_URL', ''),
],
/*
* Rackspace Config. Config should go in .env file. see :
* https://laravel.com/docs/5.8/filesystem#configuration
*
* As of version 4.3, https://github.com/thephpleague/flysystem-rackspace
* is required inside a custom Sprinkle to use this filesystem.
*
* Include thephpleague/flysystem-rackspace in a custom Sprinkle to use.
*/
'rackspace' => [
'driver' => 'rackspace',
'username' => env('RACKSPACE_USERNAME', ''),
'key' => env('RACKSPACE_KEY', ''),
'container' => env('RACKSPACE_CONTAINER', ''),
'endpoint' => env('RACKSPACE_ENDPOINT', ''),
'region' => env('RACKSPACE_REGION', ''),
'url_type' => env('RACKSPACE_URL_TYPE', ''),
],
],
],
/*
* ----------------------------------------------------------------------
* Mail Service Config
* ----------------------------------------------------------------------
* See https://learn.userfrosting.com/mail/the-mailer-service
*/
'mail' => [
'mailer' => env('MAIL_MAILER', 'smtp'), // Set to one of 'smtp', 'mail', 'qmail', 'sendmail'
'host' => env('SMTP_HOST'),
'port' => env('SMTP_PORT', 587),
'auth' => env('SMTP_AUTH', true),
'secure' => env('SMTP_SECURE', 'tls'), // Enable TLS encryption. Set to `tls`, `ssl` or `false` (to disabled)
'username' => env('SMTP_USER'),
'password' => env('SMTP_PASSWORD'),
'smtp_debug' => 4,
'message_options' => [
'CharSet' => 'UTF-8',
'isHtml' => true,
'Timeout' => 15,
],
],
/*
* ----------------------------------------------------------------------
* Migration Service Config
* ----------------------------------------------------------------------
* `repository_table` is the table with the list of ran migrations
*/
'migrations' => [
'repository_table' => 'migrations',
],
/*
* ----------------------------------------------------------------------
* Filesystem paths
* ----------------------------------------------------------------------
*/
'path' => [
'document_root' => str_replace(DIRECTORY_SEPARATOR, \UserFrosting\DS, $_SERVER['DOCUMENT_ROOT']),
'public_relative' => dirname($_SERVER['SCRIPT_NAME']), // The location of `index.php` relative to the document root. Use for sites installed in subdirectories of your web server's document root.
],
/*
* ----------------------------------------------------------------------
* Session Config
* ----------------------------------------------------------------------
* Custom PHP Sessions Handler config. Sessions can be store in file or
* database. Array handler can be used for testing
*/
'session' => [
'handler' => 'file', // Supported Handler : `file`, `database` or `array`
// Config values for when using db-based sessions
'database' => [
'table' => 'sessions',
],
'name' => 'uf4',
'minutes' => 120,
'cache_limiter' => false,
// Decouples the session keys used to store certain session info
'keys' => [
'csrf' => 'site.csrf', // the key (prefix) used to store an ArrayObject of CSRF tokens.
],
],
/*
* ----------------------------------------------------------------------
* Slim settings
* ----------------------------------------------------------------------
* See http://www.slimframework.com/docs/objects/application.html#slim-default-settings
* Set `displayErrorDetails` to true to display full error details
*/
'settings' => [
'displayErrorDetails' => true,
],
/*
* ----------------------------------------------------------------------
* Site Settings
* ----------------------------------------------------------------------
* "Site" settings that are automatically passed to Twig
*/
'site' => [
// AdminLTE skin color
// See https://adminlte.io/themes/AdminLTE/documentation/index.html#layout
'AdminLTE' => [
'skin' => 'blue',
],
// Google Analytics Settings
'analytics' => [
'google' => [
'code' => '',
'enabled' => false,
],
],
'author' => 'Author', // Site author
'csrf' => null, // Do not set this variable. The core Twig extension will override it with values from the CSRF service.
'debug' => [
'ajax' => false,
'info' => true,
],
'locales' => [
// Should be ordered according to https://en.wikipedia.org/wiki/List_of_languages_by_total_number_of_speakers,
// with the exception of English, which as the default language comes first.
'available' => [
'en_US' => true,
'zh_CN' => true,
'es_ES' => true,
'ar' => true,
'pt_BR' => true,
'pt_PT' => true,
'ru_RU' => true,
'de_DE' => true,
'fr_FR' => true,
'tr' => true,
'it_IT' => true,
'th_TH' => true,
'fa' => true,
'el' => true,
'sr_RS' => true,
],
// The default locale to use for non-registered users.
// Browser requested languages might overwrite this value.
'default' => 'en_US',
],
'title' => 'UserFrosting', // Site display name
// Global ufTable settings
'uf_table' => [
'use_loading_transition' => true,
],
// URLs
'uri' => [
// 'base' settings are no longer used to generate the uri frequently used in Twig (site.uri.public). This is due to Slim doing a better job of figuring this out on its own. This key has been kept to ensure backwards compatibility.
'base' => [
'host' => isset($_SERVER['SERVER_NAME']) ? trim($_SERVER['SERVER_NAME'], '/') : 'localhost',
'scheme' => empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] === 'off' ? 'http' : 'https',
'port' => isset($_SERVER['SERVER_PORT']) ? (int) $_SERVER['SERVER_PORT'] : null,
'path' => isset($_SERVER['SCRIPT_NAME']) ? trim(dirname($_SERVER['SCRIPT_NAME']), '/\\') : '',
],
'author' => 'https://www.userfrosting.com',
'publisher' => '',
],
],
/*
* ----------------------------------------------------------------------
* PHP global settings
* ----------------------------------------------------------------------
*/
'php' => [
'timezone' => 'America/New_York',
'error_reporting' => E_ALL, // Development - report all errors and suggestions
'display_errors' => 'true',
'log_errors' => 'false',
// Let PHP itself render errors natively. Useful if a fatal error is raised in our custom shutdown handler.
'display_errors_native' => 'false',
],
];