Update InstanceActorController, improve json seralization by not escaping slashes

This commit is contained in:
Daniel Supernault 2021-10-07 00:46:20 -06:00
parent 4505d1f0f9
commit 0a8eb81bf0
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
2 changed files with 2 additions and 2 deletions

View file

@ -12,7 +12,7 @@ class InstanceActorController extends Controller
{
$res = Cache::rememberForever(InstanceActor::PROFILE_KEY, function() {
$res = (new InstanceActor())->first()->getActor();
return json_encode($res);
return json_encode($res, JSON_UNESCAPED_SLASHES);
});
return response($res)->header('Content-Type', 'application/json');
}

View file

@ -11,7 +11,7 @@ class InstanceActor extends Model
const PROFILE_BASE = '/i/actor';
const KEY_ID = '/i/actor#main-key';
const PROFILE_KEY = 'federation:_v2:instance:actor:profile';
const PROFILE_KEY = 'federation:_v3:instance:actor:profile';
const PKI_PUBLIC = 'federation:_v1:instance:actor:profile:pki_public';
const PKI_PRIVATE = 'federation:_v1:instance:actor:profile:pki_private';