Commit 85169dc9 authored by Joshua Tauberer's avatar Joshua Tauberer

preliminary support for webfinger

It just echos back the subject given to it.
parent 5faa1cae
......@@ -39,5 +39,11 @@ server {
client_max_body_size 20M;
}
# Webfinger configuration.
location = /.well-known/webfinger {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /usr/bin/mailinabox-webfinger.php;
fastcgi_pass unix:/tmp/php-fastcgi.www-data.sock;
}
}
......@@ -31,6 +31,10 @@ rm -f /etc/init.d/php-fastcgi
ln -s $(pwd)/conf/phpfcgi-initscript /etc/init.d/php-fastcgi
update-rc.d php-fastcgi defaults
# Put our webfinger server script into a well-known location.
cp tools/webfinger.php /usr/bin/mailinabox-webfinger.php
chown www-data.www-data /usr/bin/mailinabox-webfinger.php
# Start services.
service nginx restart
service php-fastcgi restart
......
<?php
$resource = $_GET['resource'];
header("Content-type: application/json");
echo json_encode(array(
subject => $resource,
), JSON_PRETTY_PRINT);
?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment