mirror of
https://github.com/friendica/friendica
synced 2025-04-25 20:30:11 +00:00
Use rawContent for Special Options to avoid a protected options() method
This commit is contained in:
parent
35a2fd45af
commit
6dbbd08179
4 changed files with 3 additions and 23 deletions
|
@ -34,13 +34,9 @@ use Friendica\Module\Response;
|
|||
*/
|
||||
class Options extends BaseModule
|
||||
{
|
||||
protected function options(array $request = [])
|
||||
protected function rawContent(array $request = [])
|
||||
{
|
||||
$allowedMethods = $this->parameters['AllowedMethods'] ?? [];
|
||||
|
||||
if (empty($allowedMethods)) {
|
||||
$allowedMethods = Router::ALLOWED_METHODS;
|
||||
}
|
||||
$allowedMethods = $this->parameters['AllowedMethods'] ?? Router::ALLOWED_METHODS;
|
||||
|
||||
// @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/OPTIONS
|
||||
$this->response->setHeader(implode(',', $allowedMethods), 'Allow');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue