Release
This commit is contained in:
12
web/api/config_set.php
Normal file
12
web/api/config_set.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
require __DIR__ . '/../lib/app.php';
|
||||
require __DIR__ . '/../lib/torctl.php';
|
||||
|
||||
auth_require();
|
||||
header('Content-Type: application/json');
|
||||
|
||||
$in = json_decode(file_get_contents('php://input'), true);
|
||||
if (!is_array($in)) { echo json_encode(['ok'=>false,'error'=>'bad json']); exit; }
|
||||
|
||||
$ok = config_apply($in);
|
||||
echo json_encode(['ok'=>$ok]);
|
||||
Reference in New Issue
Block a user