Skip to content

Commit

Permalink
feat(capabilities): Expose if mod-rewrite is working via capabilities
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <coding@schilljs.com>
  • Loading branch information
nickvergessen committed Apr 12, 2024
1 parent 715077e commit bbaaaf4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@
"pollinterval",
"webdav-root",
"reference-api",
"reference-regex"
"reference-regex",
"mod-rewrite-working"
],
"properties": {
"pollinterval": {
Expand All @@ -113,6 +114,9 @@
},
"reference-regex": {
"type": "string"
},
"mod-rewrite-working": {
"type": "boolean"
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions lib/private/OCS/CoreCapabilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public function __construct(
* webdav-root: string,
* reference-api: boolean,
* reference-regex: string,
* mod-rewrite-working: boolean,
* },
* }
*/
Expand All @@ -59,6 +60,7 @@ public function getCapabilities(): array {
'webdav-root' => $this->config->getSystemValueString('webdav-root', 'remote.php/webdav'),
'reference-api' => true,
'reference-regex' => IURLGenerator::URL_REGEX_NO_MODIFIERS,
'mod-rewrite-working' => $this->config->getSystemValueBool('htaccess.IgnoreFrontController') || getenv('front_controller_active') === 'true',
],
];
}
Expand Down

0 comments on commit bbaaaf4

Please sign in to comment.