summaryrefslogtreecommitdiffstats
path: root/apps/user_webfinger
diff options
context:
space:
mode:
authorMichiel de Jong <michiel@unhosted.org>2011-12-07 21:51:47 +0700
committerMichiel de Jong <michiel@unhosted.org>2011-12-07 21:51:47 +0700
commitb9e6f5e42d54fc91205f03f4b19bbf313278f476 (patch)
tree5aeeb1365cb8610574a2a694aa16a04888571d15 /apps/user_webfinger
parenta0548a416a56f6e0fd3269279777d57156c47d15 (diff)
downloadnextcloud-server-b9e6f5e42d54fc91205f03f4b19bbf313278f476.tar.gz
nextcloud-server-b9e6f5e42d54fc91205f03f4b19bbf313278f476.zip
compliance with http://www.w3.org/community/unhosted/wiki/remoteStorage
Diffstat (limited to 'apps/user_webfinger')
-rw-r--r--apps/user_webfinger/webfinger.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/apps/user_webfinger/webfinger.php b/apps/user_webfinger/webfinger.php
index 349afaba507..d695a833f31 100644
--- a/apps/user_webfinger/webfinger.php
+++ b/apps/user_webfinger/webfinger.php
@@ -22,10 +22,20 @@ if($_GET['q']) {
if(substr($userName, 0, 5) == 'acct:') {
$userName = substr($userName, 5);
}
+if($_SERVER['HTTPS']) {
+ $baseAddress = 'https://'.$_SERVER['SERVER_NAME'].'/apps/remoteStorage/';
+} else {
+ $baseAddress = 'http://'.$_SERVER['SERVER_NAME'].'/apps/remoteStorage/';
+}
echo "<";
?>
?xml version="1.0" encoding="UTF-8"?>
<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0" xmlns:hm="http://host-meta.net/xrd/1.0">
<hm:Host xmlns="http://host-meta.net/xrd/1.0"><?php echo $_SERVER['SERVER_NAME'] ?></hm:Host>
- <Link rel="http://unhosted.org/spec/dav/0.1" href="http<?php echo ($_SERVER['HTTPS']?'s':''); ?>://<?php echo $_SERVER['SERVER_NAME'].$WEBROOT ?>/apps/remoteStorage/compat.php/<?php echo $userName ?>/remoteStorage/" />
+ <Link
+ rel="remoteStorage"
+ template="<?php echo $baseAddress ?>WebDAV.php/<?php echo $userName ?>/remoteStorage/{category}/"
+ api="WebDAV"
+ auth="<?php echo $baseAddress; ?>auth.php/<?php echo $userName ?>"
+ ></Link>
</XRD>