about summary refs log tree commit diff
path: root/app/controllers/accounts_controller.rb
diff options
context:
space:
mode:
authorJenkins <jenkins@jenkins.ninjawedding.org>2018-01-04 23:17:11 +0000
committerJenkins <jenkins@jenkins.ninjawedding.org>2018-01-04 23:17:11 +0000
commitc69a23ae4668bad91e3992dbd72e7b3a62427bf9 (patch)
treefc8e594f6f9ecc1dd5cb13c491aa17c372adb587 /app/controllers/accounts_controller.rb
parentfc884d015a1a2d6c31976af3d63039390fa15939 (diff)
parentd872902997c29e228001b71a4a3ede589e346f5d (diff)
Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master
Diffstat (limited to 'app/controllers/accounts_controller.rb')
-rw-r--r--app/controllers/accounts_controller.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb
index 31144fe05..c9725ed00 100644
--- a/app/controllers/accounts_controller.rb
+++ b/app/controllers/accounts_controller.rb
@@ -2,7 +2,8 @@
 
 class AccountsController < ApplicationController
   include AccountControllerConcern
-  include SignatureVerification
+
+  before_action :set_cache_headers
 
   def show
     respond_to do |format|
@@ -27,10 +28,11 @@ class AccountsController < ApplicationController
       end
 
       format.json do
-        render json: @account,
-               serializer: ActivityPub::ActorSerializer,
-               adapter: ActivityPub::Adapter,
-               content_type: 'application/activity+json'
+        skip_session!
+
+        render_cached_json(['activitypub', 'actor', @account.cache_key], content_type: 'application/activity+json') do
+          ActiveModelSerializers::SerializableResource.new(@account, serializer: ActivityPub::ActorSerializer, adapter: ActivityPub::Adapter)
+        end
       end
     end
   end