12 lines
341 B
PHP
12 lines
341 B
PHP
<?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]); |