Merge pull request #6727 from nupplaphil/issue/6472-nodeinfo

Returning 404 if nodeinfo isn't enabled
This commit is contained in:
Tobias Diekershoff 2019-02-23 10:24:16 +01:00 committed by GitHub
commit 5f84c7f3ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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