about summary refs log tree commit diff
path: root/app/controllers/activitypub/outboxes_controller.rb
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-04-04 14:53:52 +0200
committerThibaut Girka <thib@sitedethib.com>2019-04-04 14:53:52 +0200
commit1682ac571763f473da54074b0608cd9ccb4b9ae5 (patch)
tree2cb3f134660b2d7d460772966f7eb595395611f7 /app/controllers/activitypub/outboxes_controller.rb
parent3f5acc1ab3bc9c5a6c5805901a393ccd3457b909 (diff)
parent26bd9fa508ac155f996c2c0d9753a27d46158749 (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- app/controllers/following_accounts_controller.rb
  Conflicts were due to glitch-soc's theming system.
- app/javascript/packs/public.js
  Some code has been change upstream, but it has been
  moved to app/javascript/core/settings.js in glitch-soc.
  Applied the changes there.
Diffstat (limited to 'app/controllers/activitypub/outboxes_controller.rb')
-rw-r--r--app/controllers/activitypub/outboxes_controller.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/controllers/activitypub/outboxes_controller.rb b/app/controllers/activitypub/outboxes_controller.rb
index be4289b21..438fa226e 100644
--- a/app/controllers/activitypub/outboxes_controller.rb
+++ b/app/controllers/activitypub/outboxes_controller.rb
@@ -7,8 +7,14 @@ class ActivityPub::OutboxesController < Api::BaseController
 
   before_action :set_account
   before_action :set_statuses
+  before_action :set_cache_headers
 
   def show
+    unless page_requested?
+      skip_session!
+      expires_in 1.minute, public: true
+    end
+
     render json: outbox_presenter, serializer: ActivityPub::OutboxSerializer, adapter: ActivityPub::Adapter, content_type: 'application/activity+json'
   end