discourse/spec/lib/onebox/engine
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
..
allowlisted_generic_onebox_spec.rb SECURITY: Onebox canonical links bypassing FinalDestination checks (#13605) 2021-07-01 20:09:29 +05:30
amazon_onebox_spec.rb FIX: Quoting Oneboxed content should exclude formatting (#13296) 2021-06-07 13:03:53 -04:00
animated_image_onebox_spec.rb FIX: Giphy oneboxing when the response is an image (#13199) 2021-05-28 15:10:32 -04:00
audio_onebox_spec.rb
cloudapp_onebox_spec.rb
gfycat_onebox_spec.rb
github_actions_onebox_spec.rb
github_blob_onebox_spec.rb
github_commit_onebox_spec.rb
github_folder_onebox_spec.rb DEV: fix test (missed a reference to master) 2021-07-19 12:47:45 -04:00
github_gist_onebox_spec.rb
github_pullrequest_onebox_spec.rb
gitlab_blob_onebox_spec.rb
google_docs_onebox_spec.rb
google_drive_onebox_spec.rb
google_maps_onebox_spec.rb
google_photos_onebox_spec.rb SECURITY: Onebox canonical links bypassing FinalDestination checks (#13605) 2021-07-01 20:09:29 +05:30
google_play_app_onebox_spec.rb
html_spec.rb
image_onebox_spec.rb FEATURE: Onebox can match engines based on the content_type (#13876) 2021-07-30 13:36:30 -04:00
imgur_onebox_spec.rb
instagram_onebox_spec.rb DEV: Fix flaky specs (#13226) 2021-06-01 14:38:55 +02:00
json_spec.rb
kaltura_onebox_spec.rb
pdf_onebox_spec.rb
pubmed_onebox_spec.rb
reddit_media_onebox.rb
slides_onebox_spec.rb
stack_exchange_onebox_spec.rb
trello_onebox_spec.rb
twitch_clips_onebox_spec.rb
twitch_stream_onebox_spec.rb
twitch_video_onebox_spec.rb
twitter_status_onebox_spec.rb FIX: Don’t use user_generated images as avatar images in Oneboxed Twitter content (#13712) 2021-07-13 14:54:28 -04:00
typeform_onebox_spec.rb
video_onebox_spec.rb
wikimedia_onebox_spec.rb
wikipedia_onebox_spec.rb
xkcd_spec.rb
youku_onebox_spec.rb
youtube_onebox_spec.rb SECURITY: Sanitize YouTube Onebox data (#13748) 2021-07-15 19:31:50 +01:00