diff --git a/app/models/communication/website/with_security.rb b/app/models/communication/website/with_security.rb index 9ae03475b1e6d02fdc7515fd18464ab2e5d9035f..5c05303a8db674be1ea6aad51dbf4de577e0777f 100644 --- a/app/models/communication/website/with_security.rb +++ b/app/models/communication/website/with_security.rb @@ -32,7 +32,9 @@ module Communication::Website::WithSecurity list = [] blocks.where(template_kind: :video).each do |block| video_url = block.template.url - list << URI.parse(video_url).host if url.present? + next unless video_url.present? + video_iframe_url = Video::Provider.find(video_url).iframe_url + list << URI.parse(video_iframe_url).host end list end