Allow CORS requests to nodeinfo endpoints
This commit is contained in:
parent
bc4b036c76
commit
b85a2709e8
1 changed files with 5 additions and 0 deletions
|
@ -190,6 +190,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');
|
||||
|
|
Loading…
Reference in a new issue