mirror of
https://github.com/friendica/friendica
synced 2025-04-25 20:30:11 +00:00
Add explicit status setting for PSR/ResponseInterface & add tests for OPTIONS endpoint
This commit is contained in:
parent
3092e74a3a
commit
eaad220738
6 changed files with 60 additions and 4 deletions
|
@ -10,7 +10,7 @@ class Options extends BaseModule
|
|||
protected function options(array $request = [])
|
||||
{
|
||||
// @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/OPTIONS
|
||||
$this->response->setHeader('Allow', implode(',', Router::ALLOWED_METHODS));
|
||||
$this->response->setHeader(($this->server['SERVER_PROTOCOL'] ?? 'HTTP/1.1') . ' 204 No Content');
|
||||
$this->response->setHeader(implode(',', Router::ALLOWED_METHODS), 'Allow');
|
||||
$this->response->setStatus(204);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue