Update rest.php to check if remote api is allowed.
This is untested, check copied from json.php.
Maybe should also check demo_mode and disable REST?
This is untested, check copied from json.php.
Maybe should also check demo_mode and disable REST?