-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathconfig.dist.php
More file actions
290 lines (258 loc) · 7.62 KB
/
config.dist.php
File metadata and controls
290 lines (258 loc) · 7.62 KB
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
<?php
namespace KaraDAV;
/**
* This is the configuration file for KaraDAV
* *DO NOT* edit the config.dist.php, copy it to config.local.php
* and edit it to suit your needs. Changing config.dist.php won't do
* anything.
*
* If config.local.php does not exist, default values will be used.
*/
/**
* Default quota for new users (in MB)
* Default: 200 MB
* @var int
*/
//const DEFAULT_QUOTA = 200;
/**
* Default delay after which files should be deleted from the trashbin
* (in seconds)
* Set to zero (0) to disable the trashbin (files will be deleted directly)
* Default: 30 days
* @var int
*/
//const DEFAULT_TRASHBIN_DELAY = 60*60*24*30; // 30 days
/**
* Enable or disable thumbnail generation
* This might consume a lot of CPU and storage if you have a lot of images.
* Default: true
* @var bool
*/
//const ENABLE_THUMBNAILS = true;
/**
* Directory where all data will be stored
* Default: 'data' inside root of KaraDAV
* @var string
*/
//const DATA_ROOT = __DIR__ . '/data';
/**
* Users file storage path
* %s is replaced by the login name of the user
* @var string
*/
//const STORAGE_PATH = DATA_ROOT . '/%s';
/**
* Path to a directory containing cache files (templates, thumbnails)
* @var string
*/
//const CACHE_PATH = DATA_ROOT . '/.cache';
/**
* SQLite3 database file
* This is where the users, app sessions and stuff will be stored
* @var string
*/
//const DB_FILE = DATA_ROOT . '/db.sqlite';
/**
* SQLite3 journaling mode
* Default: TRUNCATE (slower, but safer)
* Recommended: WAL (faster, but read below)
*
* If your database file is on a local disk, you will get better performance by using
* 'WAL' journaling instead. But it is not enabled by default as it may
* lead to database corruption on some network storage (eg. old NFS).
*
* @see https://www.sqlite.org/pragma.html#pragma_journal_mode
* @see https://www.sqlite.org/wal.html
* @see https://stackoverflow.com/questions/52378361/which-nfs-implementation-is-safe-for-sqlite-database-accessed-by-multiple-proces
*
* Default: TRUNCATE (safe)
* @var string
*/
//const DB_JOURNAL_MODE = 'WAL';
/**
* WWW_URL is the complete URL of the root of this server
*
* If you don't define it, KaraDAV will try to auto-detects it as well as it can.
* But you may have to assign something static instead if that fails, for example:
*
* Default: will be automatically created using SERVER_NAME and REQUEST_URI
* @var string
*/
//const WWW_URL = 'http://karadav.localhost/';
/**
* WOPI client discovery URL
* eg. http://onlyoffice.domain.tld/hosting/discovery for OnlyOffice
* If set to NULL, WOPI support is disabled
* @var string|null
*/
//const WOPI_DISCOVERY_URL = null;
/**
* Set this to TRUE if you want 'Access-Control-Allow-Origin' header to be set to '*'
* and allow remote JS clients to make WebDAV requests.
* @var bool
*/
//const ACCESS_CONTROL_ALL = false;
/**
* Path to a log file (eg. __DIR__ . '/debug.log')
* This will log all HTTP requests and responses received by the server
* @var string|null
*/
//const LOG_FILE = null;
/**
* Set to TRUE if you have X-SendFile module installed and configured
* see https://tn123.org/mod_xsendfile/
* @var bool
*/
//const ENABLE_XSENDFILE = false;
/**
* List of external apps that will be added to the menu
*
* See doc/APPS.md for details.
* Default: null
* @var array|null
*/
//const EXTERNAL_APPS = [
// 'podcasts' => [
// 'label' => 'Podcasts',
// 'icon' => 'https://opodsync.example.org/logo.svg',
// 'url' => 'https://opodsync.example.org/',
// ],
//];
/**
* API key for passing session information to external apps
*
* See doc/APPS.md for details.
* Default: null
* @var string|null
*/
//const EXTERNAL_API_KEY = 'abcd';
/**
* External authentication callback
*
* Use this to authenticate a user with a third-party service.
* Provide a valid PHP callback: either a function name, or a class name and method in an array.
*
* The callback will be passed the username and password as parameters, and must return
* TRUE if auth was successful, or FALSE otherwise.
*
* If the callback returned TRUE and the user does not exist in the database,
* it will be created with the default quota.
*
* Default: null
* @var string|array|null
*/
//const AUTH_CALLBACK = ['MyAuthClass', 'login'];
//const AUTH_CALLBACK = 'KaraDAV\my_login';
//function my_login(string $user, string $password) {
// return ($user == 'me' && $password == 'secret');
//}
/**
* LDAP server configuration
*
* To use a LDAP server for login, fill those details.
* All LDAP constants MUST be filled, if any constant is NULL, then LDAP support is disabled.
*
* All users signing in with success, who don't have an existing account,
* will be created locally and have the default quota.
*
* Example strings are taken from https://yunohost.org/en/packaging_sso_ldap_integration#ldap-integration
*
* Default: null
* @var string|null
*/
//const LDAP_HOST = '127.0.0.1';
/**
* LDAP server port
* @var int
*/
//const LDAP_PORT = 389;
/**
* LDAP security
* Set to TRUE if using LDAPS
* @var bool
*/
//const LDAP_SECURE = false;
/**
* LDAP user DN
* This is used in bind. Use %s for user login string.
* @var string
*/
//const LDAP_LOGIN = 'uid=%s,ou=users,dc=yunohost,dc=org';
/**
* LDAP base DN
* @var string
*/
//const LDAP_BASE = 'dc=yunohost,dc=org';
/**
* LDAP display name attribute
* @var string
*/
//const LDAP_DISPLAY_NAME = 'displayname';
/**
* LDAP Search filter
* This is used to find out if a logged-in user has the permission to access this application.
* Use %s for the user login.
* @var string
*/
//const LDAP_FIND_USER = '(&(|(objectclass=posixAccount))(uid=%s)(permission=cn=karadav.main,ou=permission,dc=yunohost,dc=org))';
/**
* LDAP admin filter
* This is used to find out if user can manage other users account and change quota etc.
* Use %s for the user login
* @var string
*/
//const LDAP_FIND_IS_ADMIN = '(&(|(objectclass=posixAccount))(uid=%s)(permission=cn=karadav.admin.main,ou=permission,dc=yunohost,dc=org))';
/**
* Block iOS apps
* This is enabled by default as they have been reported as not working,
* and I don't have an iOS device to make any test.
* To avoid any data loss, they are disabled.
* If you want to test iOS apps, set this to FALSE, and if you can, send us logs
* or patches!
* @var bool
*/
//const BLOCK_IOS_APPS = true;
/**
* Show PHP errors details to users?
* If set to TRUE, full error messages and source code will be displayed to visitors.
* If set to FALSE, just a generic "an error happened" message will be displayed.
*
* It is recommended to set this to FALSE in production.
* Default: TRUE
*
* @var bool
*/
//const ERRORS_SHOW = true;
/**
* Send PHP errors to this email address
* The email will contain
* Default: NULL (errors are not sent by email)
*
* @var string|null
*/
//const ERRORS_EMAIL = null;
/**
* Log PHP errors in this file.
* Default: ROOT/data/error.log
*
* @var string
*/
//const ERRORS_LOG = __DIR__ . '/data/error.log';
/**
* Send errors reports to this errbit/airbrake compatible API endpoint
* Default: NULL
* Example: 'https://user:password@domain.tld/errors'
*
* @var string|null
* @see https://errbit.com/images/error_summary.png
* @see https://airbrake.io/docs/api/#create-notice-v3
*/
//const ERRORS_REPORT_URL = null;
/**
* Randomly generated secret key
* Usually you won't need to fill this constant. A random secret key will be generated
* and written to this file when the first access is made.
* But if you don't allow your web server to write to this file, then please use a true
* random bytes generator to create a ~30 bytes random key and put it in this constant :)
*/
//const SECRET_KEY = 'verySECRETstringHEREplease';