mirror of
https://github.com/discourse/discourse.git
synced 2025-01-16 11:12:45 +08:00
f369db5ae9
Onebox embeds currently default to accepting any language response from the destination, which can have some surprising behaviour. For example the `curl` equivalent of what Onebox does: ``` % curl -si -H "Accept-Language: *" 'https://developer.android.com/studio' | grep location: location: /studio?hl=hi ``` This PR uses the value of `SiteSetting.default_locale` to populate the `Accept-Language` header, falling back to English if that isn't available, then finally accepting whatever language the destination makes available. |
||
---|---|---|
.. | ||
engine | ||
mixins | ||
templates | ||
domain_checker.rb | ||
engine.rb | ||
file_type_finder.rb | ||
helpers.rb | ||
json_ld.rb | ||
layout_support.rb | ||
layout.rb | ||
matcher.rb | ||
movie.rb | ||
normalizer.rb | ||
oembed.rb | ||
open_graph.rb | ||
preview.rb | ||
sanitize_config.rb | ||
status_check.rb | ||
template_support.rb | ||
view.rb |