aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xinclude/oembed.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/oembed.php b/include/oembed.php
index aac7d15b4..5865c95d5 100755
--- a/include/oembed.php
+++ b/include/oembed.php
@@ -149,7 +149,14 @@ function oembed_fetch_url($embedurl){
if ($action !== 'block') {
// try oembed autodiscovery
$redirects = 0;
- $result = z_fetch_url($furl, false, $redirects, array('timeout' => 30, 'accept_content' => "text/*", 'novalidate' => true ));
+ $result = z_fetch_url($furl, false, $redirects,
+ [
+ 'timeout' => 30,
+ 'accept_content' => "text/*",
+ 'novalidate' => true,
+ 'session' => ((local_channel() && $zrl) ? true : false)
+ ]
+ );
if($result['success'])
$html_text = $result['body'];
@@ -200,7 +207,7 @@ function oembed_fetch_url($embedurl){
if ($txt[0]!="{") $txt='{"type":"error"}';
- //save in cache
+ // save in cache
if(! get_config('system','oembed_cache_disable'))
Zlib\Cache::set('[' . App::$videowidth . '] ' . $furl, $txt);