discourse/spec/lib/onebox
Natalie Tay aac9f43038
Only block domains at the final destination (#15689)
In an earlier PR, we decided that we only want to block a domain if 
the blocked domain in the SiteSetting is the final destination (/t/59305). That 
PR used `FinalDestination#get`. `resolve` however is used several places
 but blocks domains along the redirect chain when certain options are provided.

This commit changes the default options for `resolve` to not do that. Existing
users of `FinalDestination#resolve` are
- `Oneboxer#external_onebox`
- our onebox helper `fetch_html_doc`, which is used in amazon, standard embed 
and youtube
  - these folks already go through `Oneboxer#external_onebox` which already
  blocks correctly
2022-01-31 15:35:12 +08:00
..
engine FIX: Hide excerpt of binary files in GitHub onebox (#15639) 2022-01-19 14:45:36 +02:00
domain_checker_spec.rb Only block domains at the final destination (#15689) 2022-01-31 15:35:12 +08:00
engine_spec.rb FIX: origins_to_regexes should always return an array (#15589) 2022-01-17 12:48:41 -05: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