mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-11-02 18:38:48 +03:00
Improved Nextcloud integration for #96
This commit is contained in:
parent
dc241ded1b
commit
5c597c4c1d
10 changed files with 123 additions and 35 deletions
44
integrations/nextcloud/snappymail/app/include.php
Normal file
44
integrations/nextcloud/snappymail/app/include.php
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
<?php
|
||||
|
||||
// Name this file as "include.php" to enable it.
|
||||
|
||||
//header('Strict-Transport-Security: max-age=31536000');
|
||||
|
||||
/**
|
||||
* Uncomment to use gzip compressed output
|
||||
*/
|
||||
//define('USE_GZIP', 1);
|
||||
|
||||
/**
|
||||
* Uncomment to use brotli compressed output
|
||||
*/
|
||||
//define('USE_BROTLI', 1);
|
||||
|
||||
/**
|
||||
* Uncomment to enable multiple domain installation.
|
||||
*/
|
||||
//define('MULTIDOMAIN', 1);
|
||||
|
||||
/**
|
||||
* Uncomment to disable APCU.
|
||||
*/
|
||||
//define('APP_USE_APCU_CACHE', false);
|
||||
|
||||
/**
|
||||
* Custom 'data' folder path
|
||||
*/
|
||||
if (!empty($_ENV['SNAPPYMAIL_NEXTCLOUD'])) {
|
||||
define('APP_DATA_FOLDER_PATH', \rtrim(\trim(\OC::$server->getSystemConfig()->getValue('datadirectory', '')), '\\/').'/appdata_snappymail/');
|
||||
} else {
|
||||
http_response_code(400);
|
||||
header($_SERVER['SERVER_PROTOCOL'].' 400 Bad Request', true, 400);
|
||||
error_log("SnappyMail outside Nextcloud {$_SERVER['REQUEST_URI']}");
|
||||
exit('Not inside Nextcloud');
|
||||
// define('APP_DATA_FOLDER_PATH', dirname(__DIR__) . '/snappymail-data/');
|
||||
// define('APP_DATA_FOLDER_PATH', '/var/external-snappymail-data-folder/');
|
||||
}
|
||||
|
||||
/**
|
||||
* Additional configuration file name
|
||||
*/
|
||||
//define('APP_CONFIGURATION_NAME', $_SERVER['HTTP_HOST'].'.ini');
|
||||
Loading…
Add table
Add a link
Reference in a new issue