]> git.mxchange.org Git - friendica.git/blobdiff - src/BaseModule.php
"browser_update" is integer, not boolean
[friendica.git] / src / BaseModule.php
index 0e645edf6a6ab1f9e2d545d1a8ff3137029b20c3..c04b835c52ff4bb324c388dae1ebc940ffbc5a88 100644 (file)
@@ -189,6 +189,11 @@ abstract class BaseModule implements ICanHandleRequests
                        $this->response->setHeader('*', 'Access-Control-Allow-Headers');
                        $this->response->setHeader(Router::GET, 'Access-Control-Allow-Methods');
                        $this->response->setHeader('false', 'Access-Control-Allow-Credentials');
+               } elseif (substr($this->args->getQueryString(), 0, 9) == 'nodeinfo/') {
+                       $this->response->setHeader('*', 'Access-Control-Allow-Origin');
+                       $this->response->setHeader('*', 'Access-Control-Allow-Headers');
+                       $this->response->setHeader(Router::GET, 'Access-Control-Allow-Methods');
+                       $this->response->setHeader('false', 'Access-Control-Allow-Credentials');
                } elseif (substr($this->args->getQueryString(), 0, 8) == 'profile/') {
                        $this->response->setHeader('*', 'Access-Control-Allow-Origin');
                        $this->response->setHeader('*', 'Access-Control-Allow-Headers');
@@ -488,7 +493,7 @@ abstract class BaseModule implements ICanHandleRequests
        public function httpError(int $httpCode, string $message = '', $content = '')
        {
                if ($httpCode >= 400) {
-                       $this->logger->debug('Exit with error', ['code' => $httpCode, 'message' => $message, 'callstack' => System::callstack(20), 'method' => $this->args->getMethod(), 'agent' => $this->server['HTTP_USER_AGENT'] ?? '']);
+                       $this->logger->debug('Exit with error', ['code' => $httpCode, 'message' => $message, 'method' => $this->args->getMethod(), 'agent' => $this->server['HTTP_USER_AGENT'] ?? '']);
                }
 
                $this->response->setStatus($httpCode, $message);
@@ -523,7 +528,7 @@ abstract class BaseModule implements ICanHandleRequests
        public function jsonError(int $httpCode, $content, string $content_type = 'application/json')
        {
                if ($httpCode >= 400) {
-                       $this->logger->debug('Exit with error', ['code' => $httpCode, 'content_type' => $content_type, 'callstack' => System::callstack(20), 'method' => $this->args->getMethod(), 'agent' => $this->server['HTTP_USER_AGENT'] ?? '']);
+                       $this->logger->debug('Exit with error', ['code' => $httpCode, 'content_type' => $content_type, 'method' => $this->args->getMethod(), 'agent' => $this->server['HTTP_USER_AGENT'] ?? '']);
                }
 
                $this->response->setStatus($httpCode);