]> cat aescling's git repositories - mastodon.git/commit
Fix anonymous access to outbox not being cached by the reverse proxy (#16458)
authorClaire <claire.github-309c@sitedethib.com>
Sat, 3 Jul 2021 19:13:47 +0000 (21:13 +0200)
committerGitHub <noreply@github.com>
Sat, 3 Jul 2021 19:13:47 +0000 (21:13 +0200)
commit49219508bc2e01fe724830ca31a7cfa7adba15cf
tree98ce1a101130c9efff5ca038a1abbad3402a5a46
parent38b34199507d81cac9f4ff18b5ce11f5e7ef9f23
Fix anonymous access to outbox not being cached by the reverse proxy (#16458)

* Fix anonymous access to outbox not being cached by the reverse proxy

Up until now, anonymous access to outbox was marked as public, but with a
0 duration for caching, which means remote proxies would only serve from cache
when the server was completely overwhelmed.

Changed that cache duration to one minute, so that repeated anonymous access
to one account's outbox can be appropriately cached.

Also added `Signature` to the `Vary` header in case a page is requested, so
that authenticated fetches are never served from cache (which only contains
public toots).

* Remove Vary: Accept header from webfinger controller

Indeed, we have stopped returning xrd, and only ever return jrd, so the
Accept request header does not matter anymore.

* Cache negative webfinger hits for 3 minutes
app/controllers/activitypub/outboxes_controller.rb
app/controllers/well_known/webfinger_controller.rb
spec/controllers/activitypub/outboxes_controller_spec.rb
spec/controllers/well_known/webfinger_controller_spec.rb