Refactor [su_ajax|admin_cmd|api_webhook] methods into single /api/ interface
This commit is contained in:
9
www/commands/server_setselfaddress.php
Normal file
9
www/commands/server_setselfaddress.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
$ip = get_client_ip();
|
||||
|
||||
file_put_contents(__DIR__ . '/../dynamic/self_ip_address.auto.cfg', $ip);
|
||||
|
||||
system('add-trusted-ip "' . $ip . '"');
|
||||
|
||||
echo 'Ok.';
|
||||
Reference in New Issue
Block a user