discourse/spec/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
engine_spec.rb FEATURE: Onebox can match engines based on the content_type (#13876) 2021-07-30 13:36:30 -04:00
helpers_spec.rb SECURITY: Onebox canonical links bypassing FinalDestination checks (#13605) 2021-07-01 20:09:29 +05:30
layout_spec.rb DEV: Absorb onebox gem into core (#12979) 2021-05-26 15:11:35 +05:30
matcher_spec.rb DEV: Absorb onebox gem into core (#12979) 2021-05-26 15:11:35 +05:30
oembed_spec.rb DEV: Absorb onebox gem into core (#12979) 2021-05-26 15:11:35 +05:30
open_graph_spec.rb DEV: Absorb onebox gem into core (#12979) 2021-05-26 15:11:35 +05:30
preview_spec.rb FEATURE: Onebox can match engines based on the content_type (#13876) 2021-07-30 13:36:30 -04:00
status_check_spec.rb DEV: Absorb onebox gem into core (#12979) 2021-05-26 15:11:35 +05:30