Moving section Redirects

Signed-off-by: Christian Wolf <github@christianwolf.email>
This commit is contained in:
Christian Wolf
2025-02-28 13:38:35 +01:00
parent 30c51835df
commit c2040e8c5c

View File

@@ -641,6 +641,24 @@ Miscellaneous responses
Redirects
^^^^^^^^^
A redirect can be achieved by returning a RedirectResponse:
.. code-block:: php
<?php
namespace OCA\MyApp\Controller;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\RedirectResponse;
class PageController extends Controller {
public function toGoogle(): RedirectResponse {
return new RedirectResponse('https://google.com');
}
}
Downloads
^^^^^^^^^
@@ -777,27 +795,6 @@ The following policy for instance allows images, audio and videos from other dom
---
Redirects
^^^^^^^^^
A redirect can be achieved by returning a RedirectResponse:
.. code-block:: php
<?php
namespace OCA\MyApp\Controller;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\RedirectResponse;
class PageController extends Controller {
public function toGoogle(): RedirectResponse {
return new RedirectResponse('https://google.com');
}
}
Downloads
^^^^^^^^^