Fix caching headers in ActivityPub endpoints (#11331)

* Fix reverse-proxy caching in public fetch mode

* Fix caching in ActivityPub-specific controllers
This commit is contained in:
ThibG 2019-07-17 00:00:39 +02:00 committed by Eugen Rochko
parent 91544a6cb5
commit 15ddabf95a
5 changed files with 13 additions and 4 deletions

View file

@ -0,0 +1,9 @@
# frozen_string_literal: true
class ActivityPub::BaseController < Api::BaseController
private
def set_cache_headers
response.headers['Vary'] = 'Signature' if authorized_fetch_mode?
end
end