discourse/lib/onebox
jbrw 2f28ba318c
FEATURE: Onebox can match engines based on the content_type (#13876)
* FEATURE: Onebox can match engines based on the content_type

`FinalDestination` now returns the `content_type` of a resolved URL.

`Oneboxer` passes this value to `Onebox` itself. Onebox engines can now specify a `matches_content_type` regex of content_types that the engine can handle, regardless of the URL.

`ImageOnebox` will match URLs with a content type of `image/png`, `jpg`, `gif`, `bmp`, `tif`, etc.

This will allow images that exist at a URL without a file type extension to be correctly rendered, assuming a valid `content_type` is returned.
2021-07-30 13:36:30 -04:00
..
engine FEATURE: Onebox can match engines based on the content_type (#13876) 2021-07-30 13:36:30 -04:00
mixins Various GitHub Onebox improvements (#13163) 2021-05-27 12:38:42 +03:00
templates UX: Tweak the timestamp line in Twitter onebox (#13551) 2021-06-28 15:04:33 +02:00
discourse_onebox_sanitize_config.rb FEATURE: Add disable_onebox_media_download_controls hidden site setting (#12208) 2021-02-25 12:39:15 +10:00
engine.rb FEATURE: Onebox can match engines based on the content_type (#13876) 2021-07-30 13:36:30 -04:00
file_type_finder.rb DEV: Absorb onebox gem into core (#12979) 2021-05-26 15:11:35 +05:30
helpers.rb SECURITY: Onebox canonical links bypassing FinalDestination checks (#13605) 2021-07-01 20:09:29 +05:30
layout.rb DEV: Absorb onebox gem into core (#12979) 2021-05-26 15:11:35 +05:30
layout_support.rb DEV: Absorb onebox gem into core (#12979) 2021-05-26 15:11:35 +05:30
matcher.rb FEATURE: Onebox can match engines based on the content_type (#13876) 2021-07-30 13:36:30 -04:00
oembed.rb DEV: Absorb onebox gem into core (#12979) 2021-05-26 15:11:35 +05:30
open_graph.rb DEV: Absorb onebox gem into core (#12979) 2021-05-26 15:11:35 +05:30
preview.rb FIX: return an empty result if response from Amazon is missing expected attributes (#13173) 2021-06-01 16:23:18 -04:00
sanitize_config.rb DEV: Absorb onebox gem into core (#12979) 2021-05-26 15:11:35 +05:30
status_check.rb DEV: Absorb onebox gem into core (#12979) 2021-05-26 15:11:35 +05:30
template_support.rb DEV: Absorb onebox gem into core (#12979) 2021-05-26 15:11:35 +05:30
view.rb DEV: Absorb onebox gem into core (#12979) 2021-05-26 15:11:35 +05:30