diff options
author | zotlabs <mike@macgirvin.com> | 2017-04-19 20:48:10 -0700 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-04-26 14:12:52 +0200 |
commit | 4ca24f114b525004fc56e98cebb73a48e43e6c48 (patch) | |
tree | acb4f7a803e5a2fcca20b1a4d8feaf843085934e /include/oembed.php | |
parent | 7667c630a4a682ba5a48d1ece173cdcdff575e00 (diff) | |
download | volse-hubzilla-4ca24f114b525004fc56e98cebb73a48e43e6c48.tar.gz volse-hubzilla-4ca24f114b525004fc56e98cebb73a48e43e6c48.tar.bz2 volse-hubzilla-4ca24f114b525004fc56e98cebb73a48e43e6c48.zip |
support reverse magic-auth in oembed requests.
Diffstat (limited to 'include/oembed.php')
-rwxr-xr-x | include/oembed.php | 11 |
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); |