Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(capabilities): Expose if mod-rewrite is working via capabilities #44799

Merged
merged 1 commit into from
Apr 12, 2024

Conversation

nickvergessen
Copy link
Member

Currently only exposed on JS initial state for the webfrontend, not allowing clients to rely on it.

Checklist

@nickvergessen nickvergessen added bug 3. to review Waiting for reviews labels Apr 12, 2024
@nickvergessen nickvergessen added this to the Nextcloud 30 milestone Apr 12, 2024
@nickvergessen nickvergessen self-assigned this Apr 12, 2024
@nickvergessen
Copy link
Member Author

/backport to stable29

Signed-off-by: Joas Schilling <coding@schilljs.com>
Copy link
Contributor

@Antreesy Antreesy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -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',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a copy-paste of

'modRewriteWorking' => $this->config->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true',

Can we then use capabilities there to define modRewriteWorking in JSConfig?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could

@nickvergessen nickvergessen merged commit 6b22692 into master Apr 12, 2024
157 checks passed
@nickvergessen nickvergessen deleted the bugfix/44798/expose-mod-rewrite branch April 12, 2024 11:30
@blizzz blizzz mentioned this pull request Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose modRewriteWorking via capabilities to allow pretty URL by clients
4 participants