diff --git a/src/Uploads/UploadsRoutes.php b/src/Uploads/UploadsRoutes.php index 562d570..a068d30 100644 --- a/src/Uploads/UploadsRoutes.php +++ b/src/Uploads/UploadsRoutes.php @@ -194,6 +194,12 @@ class UploadsRoutes implements IRouteHandler { #[Route('DELETE', '/uploads/:fileid')] public function deleteUpload($response, $request, string $fileId) { + if($request->hasHeader('Origin')) + $response->setHeader('Access-Control-Allow-Credentials', 'true'); + + $response->setHeader('Access-Control-Allow-Headers', 'Authorization'); + $response->setHeader('Access-Control-Allow-Methods', 'OPTIONS, GET, DELETE'); + if(!$this->authInfo->isLoggedIn()) return 401;