Skip to content

Commit 70469cf

Browse files
committed
Improved URI segmentation
1 parent 0fb91db commit 70469cf

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

controllers/Settings.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,8 @@ public function update_onBackupStorage()
177177
*/
178178
private function getSegmentsFromRequest(): array
179179
{
180-
$segments = explode('/', trim(str_after(Request::getUri(), Backend::url()), '/'));
180+
$requestPath = parse_url(Request::getUri(), PHP_URL_PATH);
181+
$segments = explode('/', trim(str_after($requestPath, config('backend.uri')), '/'));
181182
return array_pad($segments, 3, null);
182183
}
183184

updates/version.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,6 @@
2121
1.4.0:
2222
- Scheduler workaround because of disabled proc_open
2323
1.5.0:
24-
- Added chinese lang (thanks @ZhiweiWu0425)
24+
- Added chinese lang (thanks @ZhiweiWu0425)
25+
1.5.1:
26+
- Improved URI segmentation

0 commit comments

Comments
 (0)