Remove expires_in since this would affect caching between version upgrades

This commit is contained in:
Emelia Smith 2024-05-02 15:54:07 +02:00
parent 70d9c8cd54
commit 93e62b1512
No known key found for this signature in database
1 changed files with 9 additions and 2 deletions

View File

@ -9,8 +9,15 @@ module WellKnown
serialization_scope nil serialization_scope nil
def show def show
expires_in 3.days, public: true # Due to this document potentially changing between Mastodon versions (as
render_with_cache json: ::OauthMetadataPresenter.new, serializer: ::OauthMetadataSerializer, content_type: 'application/json' # new OAuth scopes are added), we don't use expires_in to cache upstream,
# instead just caching in the rails cache:
render_with_cache(
json: ::OauthMetadataPresenter.new,
serializer: ::OauthMetadataSerializer,
content_type: 'application/json',
expires_in: 15.minutes
)
end end
end end
end end