Skip to content
Snippets Groups Projects
Commit f93be510 authored by Michiel de Jong's avatar Michiel de Jong
Browse files

check activation and make activation impossible by default

parent d07f3d54
No related branches found
No related tags found
No related merge requests found
<?php
// comment out this line:
die("This feature is still experimental. Please comment out this line in the code, then try again\n");
//
$ownCloudBaseUri = substr($_SERVER['REQUEST_URI'],0, -(strlen('/apps/user_webfinger/activate.php')));
$thisAppDir = __DIR__;
$appsDir = dirname($thisAppDir);
$ownCloudDir = dirname($appsDir);
try{
symlink($thisAppDir, $ownCloudDir.'/.well-known');
echo "Webfinger should now work.";
echo "Webfinger should now work.\n";
} catch(Exception $e) {
echo "Please create a file called '.well-known in the ownCloud root, give the web server user permission to change it, and retry;";
echo "Please create a file called '.well-known in the ownCloud root, give the web server user permission to change it, and retry.\n";
}
<?php
header("Access-Control-Allow-Origin: *");
if($_SERVER['SCRIPT_NAME'] == '/.well-known/host-meta.php') {
header("Access-Control-Allow-Origin: *");
} else {
header('Please visit /apps/user_webfinger/activate.php first');
}
header("Content-Type: application/xml+xrd");
echo "<";
?>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment