diff --git a/__webfinger_companion__/.well-known/webfinger/index.php b/__webfinger_companion__/.well-known/webfinger/index.php new file mode 100644 index 0000000..26a3448 --- /dev/null +++ b/__webfinger_companion__/.well-known/webfinger/index.php @@ -0,0 +1,45 @@ + "acct:".$config["public_nick"]."@".$_SERVER['SERVER_NAME'], + "links" => [ + + ["rel" => "self", + "type" => "text/plain", + "href" => $config['public_txt_url'] + ], + + ["rel" => "https://webfinger.net/rel/profile-page", + "type" => "text/html", + "href" => "http://".$_SERVER['SERVER_NAME'].$timeline_dir + ], + + ["rel" => "http://webfinger.net/rel/avatar", + "type" => "image/png", + "href" => $config['public_avatar'] + ], + ] + ]; + + header("Content-type: application/jrd+json"); + echo json_encode($webfinger_array); +} +else + header("Status: 404"); + +die();