aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-04-19 20:48:10 -0700
committerMario Vavti <mario@mariovavti.com>2017-04-26 14:12:52 +0200
commit4ca24f114b525004fc56e98cebb73a48e43e6c48 (patch)
treeacb4f7a803e5a2fcca20b1a4d8feaf843085934e /include
parent7667c630a4a682ba5a48d1ece173cdcdff575e00 (diff)
downloadvolse-hubzilla-4ca24f114b525004fc56e98cebb73a48e43e6c48.tar.gz
volse-hubzilla-4ca24f114b525004fc56e98cebb73a48e43e6c48.tar.bz2
volse-hubzilla-4ca24f114b525004fc56e98cebb73a48e43e6c48.zip
support reverse magic-auth in oembed requests.
Diffstat (limited to 'include')
-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);