diff options
author | ThibG <thib@sitedethib.com> | 2019-04-04 01:30:44 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2019-04-04 01:30:44 +0200 |
commit | cc6e3c39001c11c82b198e357dd5d3e3fc032637 (patch) | |
tree | e075a73801a32115c0137a7bf4ae8f1f7daee1de /app/controllers/activitypub/outboxes_controller.rb | |
parent | d4882aa64a7a483ec30ca61a507c2a6f5d3294f5 (diff) |
Cache featured collections, as well as outbox, followers and following (#10467)
Diffstat (limited to 'app/controllers/activitypub/outboxes_controller.rb')
-rw-r--r-- | app/controllers/activitypub/outboxes_controller.rb | 6 |
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 |