Return 404 if nodeinfo isn't enabled.

This commit is contained in:
Philipp Holzer 2019-02-23 10:10:33 +01:00
parent c1896eee34
commit 45cc8180b1
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5

View file

@ -12,7 +12,12 @@ use Friendica\Core\Logger;
use Friendica\Core\System;
use Friendica\Database\DBA;
use Friendica\Util\Network;
function nodeinfo_wellknown(App $a) {
if (!Config::get('system', 'nodeinfo')) {
System::httpExit(404);
}
$nodeinfo = ['links' => [['rel' => 'http://nodeinfo.diaspora.software/ns/schema/1.0',
'href' => System::baseUrl().'/nodeinfo/1.0']]];