2022-08-30 05:01:39 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace KaraDAV;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Users file storage path
|
|
|
|
* %s is replaced by the login name of the user
|
|
|
|
*/
|
|
|
|
const STORAGE_PATH = __DIR__ . '/data/%s';
|
|
|
|
|
2022-08-31 06:06:27 +00:00
|
|
|
/**
|
|
|
|
* SQLite3 database file
|
|
|
|
* This is where the users, app sessions and stuff will be stored
|
|
|
|
*/
|
|
|
|
const DB_FILE = __DIR__ . '/data/db.sqlite';
|
|
|
|
|
2022-08-30 05:01:39 +00:00
|
|
|
/**
|
|
|
|
* WWW_URL is the complete URL of the root of this server
|
2022-10-24 17:10:59 +00:00
|
|
|
*
|
2022-08-30 05:01:39 +00:00
|
|
|
* This code auto-detects it as well as it can
|
2022-10-24 17:10:59 +00:00
|
|
|
* But you may have to assign something static instead, for example:
|
|
|
|
*
|
2022-08-30 05:01:39 +00:00
|
|
|
* const WWW_URL = 'https://dav.website.example/';
|
|
|
|
*/
|
|
|
|
$https = (!empty($_SERVER['HTTPS']) || $_SERVER['SERVER_PORT'] == 443) ? 's' : '';
|
|
|
|
$name = $_SERVER['SERVER_NAME'];
|
|
|
|
$port = !in_array($_SERVER['SERVER_PORT'], [80, 443]) ? ':' . $_SERVER['SERVER_PORT'] : '';
|
|
|
|
$root = '/';
|
|
|
|
|
2022-09-04 00:27:40 +00:00
|
|
|
define('KaraDAV\WWW_URL', sprintf('http%s://%s%s%s', $https, $name, $port, $root));
|
2022-10-15 00:15:39 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* WOPI client discovery URL
|
|
|
|
* eg. http://onlyoffice.domain.tld/hosting/discovery for OnlyOffice
|
|
|
|
* If set to NULL, WOPI support is disabled
|
|
|
|
*/
|
|
|
|
const WOPI_DISCOVERY_URL = null;
|
2022-10-21 16:21:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Path to a log file (eg. __DIR__ . '/debug.log')
|
|
|
|
* This will log all HTTP requests and responses received by the server
|
|
|
|
*/
|
2022-10-24 17:10:59 +00:00
|
|
|
const LOG_FILE = null;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set to TRUE if you have X-SendFile module installed and configured
|
|
|
|
* see https://tn123.org/mod_xsendfile/
|
|
|
|
*/
|
|
|
|
const ENABLE_XSENDFILE = false;
|