server/settings/ajax/setsecurity.php
Lukas Reschke 466cdab680 Add security section to admin menu
Currently it only allows the admin to enable or disable the HTTPS
enforcement, but in the future it could be expanded to further options.

The HTTPS enforcement only allows the admin to enforce it, if he is
connected via HTTPS. (To prevent admins to enable it without a proper
SSL setup)
2013-01-11 14:18:51 +01:00

13 lines
No EOL
350 B
PHP

<?php
/**
* Copyright (c) 2013, Lukas Reschke <lukas@statuscode.ch>
* 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();
OC_Config::setValue( 'forcessl', filter_var($_POST['enforceHTTPS'], FILTER_VALIDATE_BOOLEAN));
echo 'true';