From 0a8eb81bf007fa74dfbde18154f60e1d9a9af9c3 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 7 Oct 2021 00:46:20 -0600 Subject: [PATCH] Update InstanceActorController, improve json seralization by not escaping slashes --- app/Http/Controllers/InstanceActorController.php | 2 +- app/Models/InstanceActor.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/InstanceActorController.php b/app/Http/Controllers/InstanceActorController.php index 136a2ede5..52d8a5cc6 100644 --- a/app/Http/Controllers/InstanceActorController.php +++ b/app/Http/Controllers/InstanceActorController.php @@ -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'); } diff --git a/app/Models/InstanceActor.php b/app/Models/InstanceActor.php index 00eacfe61..4636b10e9 100644 --- a/app/Models/InstanceActor.php +++ b/app/Models/InstanceActor.php @@ -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';