aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorprovokateurin <kate@provokateurin.de>2025-06-03 11:00:45 +0200
committerprovokateurin <kate@provokateurin.de>2025-06-03 11:09:12 +0200
commitc3aa5316be2797184ea0be10c5a984a05f5592ae (patch)
tree9d44c4a4b87327a0de97207af74ced62d5cbcc4f
parent727b0c853cd10aaf0d6ca4f2e2ce1730477c9b06 (diff)
downloadnextcloud-server-feat/requestheader/indirect-parameter.tar.gz
nextcloud-server-feat/requestheader/indirect-parameter.zip
feat(RequestHeader): Add indirect parameterfeat/requestheader/indirect-parameter
Signed-off-by: provokateurin <kate@provokateurin.de>
-rw-r--r--lib/public/AppFramework/Http/Attribute/RequestHeader.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/public/AppFramework/Http/Attribute/RequestHeader.php b/lib/public/AppFramework/Http/Attribute/RequestHeader.php
index 703d482c3e3..1d0fbbfa0c3 100644
--- a/lib/public/AppFramework/Http/Attribute/RequestHeader.php
+++ b/lib/public/AppFramework/Http/Attribute/RequestHeader.php
@@ -23,10 +23,12 @@ class RequestHeader {
/**
* @param lowercase-string $name The name of the request header
* @param non-empty-string $description The description of the request header
+ * @param bool $indirect Allow indirect usage of the header for example in a middleware. Enabling this turns off the check which ensures that the header must be referenced in the controller method.
*/
public function __construct(
protected string $name,
protected string $description,
+ protected bool $indirect = false,
) {
}
}