From 5419192079f1e1e499f6f36de8b50bf0bf04b53d Mon Sep 17 00:00:00 2001 From: Bofh Date: Tue, 22 Nov 2022 02:42:07 +0100 Subject: [PATCH] API to resolve instances hostname to URL --- api/v1/network/resolve-instance/index.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 api/v1/network/resolve-instance/index.php diff --git a/api/v1/network/resolve-instance/index.php b/api/v1/network/resolve-instance/index.php new file mode 100644 index 0000000..48bbdc0 --- /dev/null +++ b/api/v1/network/resolve-instance/index.php @@ -0,0 +1,22 @@ + + + 'Could not find /.well-known/webfinger URL in instance given XML' + ]); +} +apiresult([ + 'instance' => 'https://'.parse_url($m[0], PHP_URL_HOST), +]);