add fabrixxm's recent changes to how ".well_known" urls work
This commit is contained in:
parent
fd5dfc95f6
commit
fb35742aab
16
boot.php
16
boot.php
@ -516,22 +516,6 @@ if(! class_exists('App')) {
|
||||
$this->module = 'home';
|
||||
}
|
||||
|
||||
/**
|
||||
* Special handling for the webfinger/lrdd host XRD file
|
||||
*/
|
||||
|
||||
if($this->cmd === '.well-known/host-meta') {
|
||||
$this->argc = 1;
|
||||
$this->argv = array('hostxrd');
|
||||
$this->module = 'hostxrd';
|
||||
}
|
||||
|
||||
if(strstr($this->cmd,'.well-known/zot-guid')) {
|
||||
$this->argc -= 1;
|
||||
array_shift($this->argv);
|
||||
$this->argv[0] = 'zfinger';
|
||||
$this->module = 'zfinger';
|
||||
}
|
||||
|
||||
/**
|
||||
* See if there is any page number information, and initialise
|
||||
|
24
mod/_well_known.php
Normal file
24
mod/_well_known.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
function _well_known_init(&$a){
|
||||
|
||||
if(argc() > 1) {
|
||||
switch(argv(1)) {
|
||||
case "host-meta":
|
||||
require_once('mod/hostxrd.php');
|
||||
hostxrd_init($a);
|
||||
break;
|
||||
|
||||
case 'zot-guid':
|
||||
$a->argc -= 1;
|
||||
array_shift($a->argv);
|
||||
$a->argv[0] = 'zfinger';
|
||||
require_once('mod/zfinger.php');
|
||||
zfinger_init($a);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
http_status_exit(404);
|
||||
}
|
Reference in New Issue
Block a user