use Friendica\App;
use Friendica\BaseModule;
use Friendica\Core;
+use Friendica\Core\Config\Capability\IManageConfigValues;
use Friendica\LegacyModule;
use Friendica\Module\Home;
use Friendica\Module\HTTPException\MethodNotAllowed;
use Friendica\Module\HTTPException\PageNotFound;
use Friendica\Network\HTTPException\MethodNotAllowedException;
+use Friendica\Network\HTTPException\NoContentException;
use Friendica\Network\HTTPException\NotFoundException;
use Friendica\Util\Profiler;
use Psr\Log\LoggerInterface;
*
* @param Arguments $args The Friendica execution arguments
* @param Router $router The Friendica routing instance
- * @param \Friendica\Core\Config\Capability\IManageConfigValues $config The Friendica Configuration
+ * @param IManageConfigValues $config The Friendica Configuration
*
* @return Module The determined module of this call
*
* @throws \Exception
*/
- public function determineClass(Arguments $args, Router $router, Core\Config\Capability\IManageConfigValues $config)
+ public function determineClass(Arguments $args, Router $router, IManageConfigValues $config)
{
$printNotAllowedAddon = false;
// @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/OPTIONS
// @todo Check allowed methods per requested path
if ($server['REQUEST_METHOD'] === Router::OPTIONS) {
- header('HTTP/1.1 204 No Content');
header('Allow: ' . implode(',', Router::ALLOWED_METHODS));
- exit();
+ throw new NoContentException();
}
$placeholder = '';