aboutsummaryrefslogtreecommitdiffstats
path: root/mod/_well_known.php
diff options
context:
space:
mode:
authorHaakon Meland Eriksen <haakon.eriksen@far.no>2016-01-22 19:15:46 +0100
committerHaakon Meland Eriksen <haakon.eriksen@far.no>2016-01-22 19:15:46 +0100
commit0d119d83b0a98b2cdd31a01901bbe53374d4e467 (patch)
tree5cb387c1e8981997f626a4096b971f1bdc299f85 /mod/_well_known.php
parentb0d5b9fd2c5d5f8eb5a58b36f62dc20d6fa214b3 (diff)
parent945689d01c52871293c921329864ce3c5c7dece2 (diff)
downloadvolse-hubzilla-0d119d83b0a98b2cdd31a01901bbe53374d4e467.tar.gz
volse-hubzilla-0d119d83b0a98b2cdd31a01901bbe53374d4e467.tar.bz2
volse-hubzilla-0d119d83b0a98b2cdd31a01901bbe53374d4e467.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'mod/_well_known.php')
-rw-r--r--mod/_well_known.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/mod/_well_known.php b/mod/_well_known.php
index d88bc2391..58ed13ece 100644
--- a/mod/_well_known.php
+++ b/mod/_well_known.php
@@ -33,6 +33,19 @@ function _well_known_init(&$a){
break;
default:
+ // look in $WEBROOT/well_known for the requested file in case it is
+ // something a site requires and for which we do not have a module
+
+ // @fixme - we may need to determine the content-type and stick it in the header
+ // for now this can be done with a php script masquerading as the requested file
+
+ $wk_file = str_replace('.well-known','well_known',$a->cmd);
+ if(file_exists($wk_file)) {
+ echo file_get_contents($wk_file);
+ killme();
+ }
+ elseif(file_exists($wk_file . '.php'))
+ require_once($wk_file . '.php');
break;
}