Skip to content

Commit

Permalink
fix crsf issue when using download controller and having found a way …
Browse files Browse the repository at this point in the history
…to store files outside of public
  • Loading branch information
luceos committed Mar 29, 2021
1 parent 04c19a3 commit f0ba29e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 2 additions & 0 deletions extend.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
->get('/fof/download/{uuid}/{post}/{csrf}', 'fof-upload.download', Api\Controllers\DownloadController::class)
->patch('/fof/upload/hide', 'fof-upload.hide', Api\Controllers\HideUploadFromMediaManagerController::class),

(new Extend\Csrf)->exemptRoute('fof-upload.download'),

(new Extend\Frontend('admin'))
->css(__DIR__.'/resources/less/admin.less')
->js(__DIR__.'/js/dist/admin.js'),
Expand Down
5 changes: 0 additions & 5 deletions src/Api/Controllers/DownloadController.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,6 @@ public function __construct(Dispatcher $bus, PostRepository $posts, SettingsRepo
$this->settings = $settings;
}

/**
* @param \Psr\Http\Message\ServerRequestInterface $request
*
* @return \Psr\Http\Message\ResponseInterface
*/
public function handle(ServerRequestInterface $request): ResponseInterface
{
$actor = $request->getAttribute('actor');
Expand Down

0 comments on commit f0ba29e

Please sign in to comment.