about summary refs log tree commit diff
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-07-17 00:00:39 +0200
committerEugen Rochko <eugen@zeonfederated.com>2019-07-17 00:00:39 +0200
commit15ddabf95a34d834295484d7e4ee21515e6fc9da (patch)
treec088198dbdc16d17c8dff4427b1e9d112e41a211 /app/controllers/application_controller.rb
parent91544a6cb54e54b7cbfb266553d29763d6b68176 (diff)
Fix caching headers in ActivityPub endpoints (#11331)
* Fix reverse-proxy caching in public fetch mode

* Fix caching in ActivityPub-specific controllers
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r--app/controllers/application_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 16e7d70a3..26f3b1def 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -160,6 +160,6 @@ class ApplicationController < ActionController::Base
   end
 
   def set_cache_headers
-    response.headers['Vary'] = 'Accept, Signature'
+    response.headers['Vary'] = public_fetch_mode? ? 'Accept' : 'Accept, Signature'
   end
 end