diff --git a/apps/settings/lib/Controller/LogSettingsController.php b/apps/settings/lib/Controller/LogSettingsController.php index 62b51946af7d4..4e40b1b6d1e0a 100644 --- a/apps/settings/lib/Controller/LogSettingsController.php +++ b/apps/settings/lib/Controller/LogSettingsController.php @@ -58,11 +58,13 @@ public function download() { if (!$this->log instanceof Log) { throw new \UnexpectedValueException('Log file not available'); } - $resp = new StreamResponse($this->log->getLogPath()); - $resp->setHeaders([ - 'Content-Type' => 'application/octet-stream', - 'Content-Disposition' => 'attachment; filename="nextcloud.log"', - ]); - return $resp; + return new StreamResponse( + $this->log->getLogPath(), + Http::STATUS_OK, + [ + 'Content-Type' => 'application/octet-stream', + 'Content-Disposition' => 'attachment; filename="nextcloud.log"', + ], + ); } } diff --git a/apps/settings/openapi-administration.json b/apps/settings/openapi-administration.json index 5d39237779acd..bcad06295a307 100644 --- a/apps/settings/openapi-administration.json +++ b/apps/settings/openapi-administration.json @@ -44,7 +44,10 @@ "headers": { "Content-Disposition": { "schema": { - "type": "string" + "type": "string", + "enum": [ + "attachment; filename=\"nextcloud.log\"" + ] } } }, diff --git a/apps/settings/openapi-full.json b/apps/settings/openapi-full.json index e313a354a1617..aec155455dd7a 100644 --- a/apps/settings/openapi-full.json +++ b/apps/settings/openapi-full.json @@ -221,7 +221,10 @@ "headers": { "Content-Disposition": { "schema": { - "type": "string" + "type": "string", + "enum": [ + "attachment; filename=\"nextcloud.log\"" + ] } } },