2013-01-11 17:18:51 +04:00
|
|
|
<?php
|
|
|
|
/**
|
2014-08-22 00:22:35 +04:00
|
|
|
* Copyright (c) 2013-2014, Lukas Reschke <lukas@owncloud.com>
|
2013-01-11 17:18:51 +04:00
|
|
|
* This file is licensed under the Affero General Public License version 3 or later.
|
|
|
|
* See the COPYING-README file.
|
|
|
|
*/
|
|
|
|
|
|
|
|
OC_Util::checkAdminUser();
|
|
|
|
OCP\JSON::callCheck();
|
|
|
|
|
2014-08-22 00:22:35 +04:00
|
|
|
if(isset($_POST['enforceHTTPS'])) {
|
|
|
|
OC_Config::setValue( 'forcessl', filter_var($_POST['enforceHTTPS'], FILTER_VALIDATE_BOOLEAN));
|
|
|
|
}
|
|
|
|
|
|
|
|
if(isset($_POST['trustedDomain'])) {
|
|
|
|
$trustedDomains = OC_Config::getValue('trusted_domains');
|
|
|
|
$trustedDomains[] = $_POST['trustedDomain'];
|
|
|
|
OC_Config::setValue('trusted_domains', $trustedDomains);
|
|
|
|
}
|
2013-01-11 17:18:51 +04:00
|
|
|
|
2013-08-18 13:02:08 +04:00
|
|
|
echo 'true';
|