Blame view

sources/settings/ajax/setsecurity.php 663 Bytes
03e52840d   Kload   Init
1
2
  <?php
  /**
f7d878ff1   kload   [enh] Update to 7...
3
   * Copyright (c) 2013-2014, Lukas Reschke <lukas@owncloud.com>
03e52840d   Kload   Init
4
5
6
7
8
9
   * 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();
f7d878ff1   kload   [enh] Update to 7...
10
11
12
13
14
15
16
17
18
  if(isset($_POST['enforceHTTPS'])) {
  	 \OC::$server->getConfig()->setSystemValue('forcessl', filter_var($_POST['enforceHTTPS'], FILTER_VALIDATE_BOOLEAN));
  }
  
  if(isset($_POST['trustedDomain'])) {
  	$trustedDomains = \OC::$server->getConfig()->getSystemValue('trusted_domains');
  	$trustedDomains[] = $_POST['trustedDomain'];
  	\OC::$server->getConfig()->setSystemValue('trusted_domains', $trustedDomains);
  }
03e52840d   Kload   Init
19

31b7f2792   Kload   Upgrade to ownclo...
20
  echo 'true';