Skip to content

Commit 64d2224

Browse files
committed
fix: Remove workaround for old version of frankenphp
Not needed in v1.12.3 And update caddyfile Signed-off-by: Carl Schwan <carlschwan@kde.org>
1 parent 2933ddd commit 64d2224

3 files changed

Lines changed: 13 additions & 7 deletions

File tree

Caddyfile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
1+
# SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
2+
# SPDX-License-Identifier: AGPL-3.0-or-later
3+
#
4+
# THIS IS AN EXPERIMENTAL FEATURE
5+
# DO NOT USE THIS IN PRODUCTION, YOU HAVE BEEN WARNED.
6+
17
localhost {
28
php_server {
3-
worker index.php
9+
worker {
10+
file index.php
11+
watch
12+
}
413
}
514

615
log {

build/files-checker.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
'vite.config.ts',
9393
'vitest.config.ts',
9494
'window.d.ts',
95+
'Caddyfile',
9596
];
9697
$actualFiles = [];
9798

index.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
\OC::boot();
2626

27-
function cleanupStaticCrap(): void {
27+
function resetStaticProperties(): void {
2828
// FIXME needed because these use a static var
2929
\OC_Hook::clear();
3030
\OC_Util::$styles = [];
@@ -38,11 +38,7 @@ function cleanupStaticCrap(): void {
3838

3939
$handler = static function () {
4040
try {
41-
// In worker mode, script name is empty in FrankenPHP
42-
if ($_SERVER['SCRIPT_NAME'] === '') {
43-
$_SERVER['SCRIPT_NAME'] = $_SERVER['PHP_SELF'];
44-
}
45-
cleanupStaticCrap();
41+
resetStaticProperties();
4642
OC::init();
4743
OC::handleRequest();
4844
} catch (ServiceUnavailableException $ex) {

0 commit comments

Comments
 (0)