]> git.mxchange.org Git - friendica.git/blobdiff - index.php
Avoid beeing flooded by invalid requests
[friendica.git] / index.php
index 19b85b935601077fe8ab8e1a6d0ad6fc3951d702..faa86575eb85285e4efdb360c282c9a122104f90 100644 (file)
--- a/index.php
+++ b/index.php
@@ -48,6 +48,10 @@ if ($a->isMaxProcessesReached() || $a->isMaxLoadReached()) {
        System::httpExit(503, ['title' => 'Error 503 - Service Temporarily Unavailable', 'description' => 'System is currently overloaded. Please try again later.']);
 }
 
+if (strstr($a->query_string, '.well-known/host-meta') and ($a->query_string != '.well-known/host-meta')) {
+       System::httpExit(404);
+}
+
 if (!$a->getMode()->isInstall()) {
        if (Config::get('system', 'force_ssl') && ($a->get_scheme() == "http")
                && (intval(Config::get('system', 'ssl_policy')) == SSL_POLICY_FULL)