Commit graph

24 commits

Author SHA1 Message Date
Sachin Joshi
18234cc44e add the rich media ttl based on image exp time 2019-07-17 00:20:34 +05:45
Alex S
f4447d82b8 parsers configurable 2019-07-14 09:21:56 +03:00
rinpatch
92213fb87c Replace Mix.env with Pleroma.Config.get(:env)
Mix.env/0 is not availible in release environments such as distillery or
elixir's built-in releases.
2019-06-06 23:59:51 +03:00
Sergey Suprunenko
1690be991e Replace missing non-nullable Card attributes with empty strings 2019-05-30 21:03:31 +00:00
Roman Chvanikov
4615e56219 Add with_body: true to requests relying on max_body: val 2019-04-12 00:16:33 +07:00
William Pitcock
19afd9f81f http: rework connection timeouts to match hackney docs, enforce 1 second max TCP connection timeout 2019-03-08 22:56:16 +00:00
William Pitcock
45e57dd187 rich media: tighten fetching timeouts and size limits 2019-02-10 21:54:08 +00:00
William Pitcock
d83dbd9070 rich media: parser: reject any data which cannot be explicitly encoded into JSON 2019-02-05 20:50:57 +00:00
William Pitcock
46dba03098 rich media: parser: only try to validate strings, not numbers (OEmbed) 2019-01-31 16:19:31 +00:00
William Pitcock
dafb6f0b5e rich media: parser: reject OGP fields we cannot safely process 2019-01-31 16:03:56 +00:00
href
5ea0397e2d
Fix 4aff4efa typos 2019-01-30 21:08:41 +01:00
href
4aff4efa8d
Use multiple hackney pools
* federation (ap, salmon)
* media (rich media, media proxy)
* upload (uploader proxy)

Each "part" will stop fighting others ones -- a huge federation outbound
could before make the media proxy fail to checkout a connection in time.

splitted media and uploaded media for the good reason than an upload
pool will have all connections to the same host (the uploader upstream).
it also has a longer default retention period for connections.
2019-01-30 15:06:46 +01:00
William Pitcock
0f11254a06 rich media: parser: add some basic sanity checks on the returned data with pattern matching 2019-01-28 20:43:21 +00:00
William Pitcock
83b7062634 rich media: parser: cache negatives 2019-01-28 20:19:07 +00:00
William Pitcock
8fb16e9f0f rich media: parser: add copyright header 2019-01-28 20:00:01 +00:00
William Pitcock
de42646634 rich media: add try/rescue to ensure we catch parsing and fetching failures 2019-01-28 05:53:17 +00:00
William Pitcock
8f2f471e94 rich media: gracefully handle fetching nil URIs 2019-01-26 16:36:17 +00:00
Maxim Filippov
b8a77c5d70 Add OEmbed parser 2019-01-13 02:06:50 +02:00
Maxim Filippov
1f851a0723 Add Twitter Card parser 2019-01-10 18:09:56 +00:00
rinpatch
a2d7f0e0e9 Remove :commit since a tuple is already returned 2019-01-09 21:35:01 +03:00
William Pitcock
487c00d36d rich media: disable cachex in test mode 2019-01-04 23:53:26 +00:00
William Pitcock
0964c207eb rich media: use cachex to avoid flooding remote servers 2019-01-04 23:32:01 +00:00
Maxim Filippov
48e81d3d40 Add RichMediaController and tests 2019-01-02 17:02:50 +03:00
Maxim Filippov
2aab4e03c3 Add OGP parser 2019-01-01 23:26:40 +03:00