mirror of
https://github.com/discourse/discourse.git
synced 2025-03-25 15:10:24 +08:00
use force_https site setting when adding scheme for downloading schemaless images locally
This commit is contained in:
parent
4e78abb537
commit
f7282e4ecd
@ -50,7 +50,9 @@ module Jobs
|
||||
|
||||
extract_images_from(post.cooked).each do |image|
|
||||
src = original_src = image['src']
|
||||
src = "http:#{src}" if src.start_with?("//")
|
||||
if src.start_with?("//")
|
||||
src = "#{SiteSetting.force_https ? "https" : "http"}:#{src}"
|
||||
end
|
||||
|
||||
if is_valid_image_url(src)
|
||||
begin
|
||||
|
Loading…
x
Reference in New Issue
Block a user