diff options
Diffstat (limited to 'core/Controller/OCMController.php')
-rw-r--r-- | core/Controller/OCMController.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/Controller/OCMController.php b/core/Controller/OCMController.php index f8110278b20..d79b5b1669e 100644 --- a/core/Controller/OCMController.php +++ b/core/Controller/OCMController.php @@ -13,6 +13,8 @@ use Exception; use OCP\AppFramework\Controller; use OCP\AppFramework\Http; use OCP\AppFramework\Http\Attribute\FrontpageRoute; +use OCP\AppFramework\Http\Attribute\NoCSRFRequired; +use OCP\AppFramework\Http\Attribute\PublicPage; use OCP\AppFramework\Http\DataResponse; use OCP\Capabilities\ICapability; use OCP\IConfig; @@ -39,8 +41,6 @@ class OCMController extends Controller { * generate a OCMProvider with local data and send it as DataResponse. * This replaces the old PHP file ocm-provider/index.php * - * @PublicPage - * @NoCSRFRequired * @psalm-suppress MoreSpecificReturnType * @psalm-suppress LessSpecificReturnStatement * @return DataResponse<Http::STATUS_OK, array{enabled: bool, apiVersion: string, endPoint: string, resourceTypes: array{name: string, shareTypes: string[], protocols: array{webdav: string}}[]}, array{X-NEXTCLOUD-OCM-PROVIDERS: true, Content-Type: 'application/json'}>|DataResponse<Http::STATUS_INTERNAL_SERVER_ERROR, array{message: string}, array{}> @@ -48,6 +48,8 @@ class OCMController extends Controller { * 200: OCM Provider details returned * 500: OCM not supported */ + #[PublicPage] + #[NoCSRFRequired] #[FrontpageRoute(verb: 'GET', url: '/ocm-provider/')] public function discovery(): DataResponse { try { |