Merge branch 'feature/richmedia-ttl' into 'develop'
authorkaniini <ariadne@dereferenced.org>
Fri, 19 Jul 2019 21:36:36 +0000 (21:36 +0000)
committerkaniini <ariadne@dereferenced.org>
Fri, 19 Jul 2019 21:36:36 +0000 (21:36 +0000)
add the rich media ttl based on image exp time

See merge request pleroma/pleroma!1438

1  2 
CHANGELOG.md
config/config.exs

diff --combined CHANGELOG.md
index 6f268d1101ad5b2f8dbc8e7680a96420bb44c390,4e58b0a9f407de1966ff307a250008741d1aa89a..a9906a05ff7720ccbfa5c19283134d7b8cd0d284
@@@ -24,7 -24,6 +24,7 @@@ The format is based on [Keep a Changelo
  ### Added
  - MRF: Support for priming the mediaproxy cache (`Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy`)
  - MRF: Support for excluding specific domains from Transparency.
 +- MRF: Support for filtering posts based on who they mention (`Pleroma.Web.ActivityPub.MRF.MentionPolicy`)
  - Configuration: `federation_incoming_replies_max_depth` option
  - Mastodon API: Support for the [`tagged` filter](https://github.com/tootsuite/mastodon/pull/9755) in [`GET /api/v1/accounts/:id/statuses`](https://docs.joinmastodon.org/api/rest/accounts/#get-api-v1-accounts-id-statuses)
  - Mastodon API, streaming: Add support for passing the token in the `Sec-WebSocket-Protocol` header
@@@ -33,7 -32,6 +33,7 @@@
  - Mastodon API: Add support for muting/unmuting notifications
  - Mastodon API: Add support for the `blocked_by` attribute in the relationship API (`GET /api/v1/accounts/relationships`). <https://github.com/tootsuite/mastodon/pull/10373>
  - Mastodon API: Add `pleroma.deactivated` to the Account entity
 +- Mastodon API: added `/auth/password` endpoint for password reset with rate limit.
  - Admin API: Return users' tags when querying reports
  - Admin API: Return avatar and display name when querying users
  - Admin API: Allow querying user by ID
  - Configuration: `enabled` option for `Pleroma.Emails.Mailer`, defaulting to `false`.
  - Configuration: Pleroma.Plugs.RateLimiter `bucket_name`, `params` options.
  - Addressable lists
 +- Twitter API: added rate limit for `/api/account/password_reset` endpoint.
 +- ActivityPub: Add an internal service actor for fetching ActivityPub objects.
 +- ActivityPub: Optional signing of ActivityPub object fetches.
  
  ### Changed
  - Configuration: Filter.AnonymizeFilename added ability to retain file extension with custom text
  - Admin API: changed json structure for saving config settings.
  - RichMedia: parsers and their order are configured in `rich_media` config.
+ - RichMedia: add the rich media ttl based on image expiration time.
  
  ## [1.0.1] - 2019-07-14
  ### Security
diff --combined config/config.exs
index bda92e45d46da39dbf6e138ab185e1cc6ca11280,aa5bd0da9564d6705aedc2bc9b4b74320f6684f2..5694118668942c3c3ac4686e5a998e028b21957e
@@@ -305,8 -305,7 +305,8 @@@ config :pleroma, :activitypub
    accept_blocks: true,
    unfollow_blocked: true,
    outgoing_blocks: true,
 -  follow_handshake_timeout: 500
 +  follow_handshake_timeout: 500,
 +  sign_object_fetches: true
  
  config :pleroma, :user, deny_follow_blocked: true
  
@@@ -345,7 -344,8 +345,8 @@@ config :pleroma, :rich_media
      Pleroma.Web.RichMedia.Parsers.TwitterCard,
      Pleroma.Web.RichMedia.Parsers.OGP,
      Pleroma.Web.RichMedia.Parsers.OEmbed
-   ]
+   ],
+   ttl_setters: [Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl]
  
  config :pleroma, :media_proxy,
    enabled: false,
@@@ -529,11 -529,8 +530,11 @@@ config :http_signatures
  config :pleroma, :rate_limit,
    search: [{1000, 10}, {1000, 30}],
    app_account_creation: {1_800_000, 25},
 +  relations_actions: {10_000, 10},
 +  relation_id_action: {60_000, 2},
    statuses_actions: {10_000, 15},
 -  status_id_action: {60_000, 3}
 +  status_id_action: {60_000, 3},
 +  password_reset: {1_800_000, 5}
  
  # Import environment specific config. This must remain at the bottom
  # of this file so it overrides the configuration defined above.