fix: update alias route to handle requested path correctly with express 5

This commit is contained in:
Viren070
2025-08-31 18:57:58 +01:00
parent 6acc26f987
commit bd88d3de8b
+5 -2
View File
@@ -12,9 +12,12 @@ interface AliasParams {
[key: string]: string;
}
router.get('/:alias/*any', (req: Request<AliasParams>, res) => {
router.get('/:alias/*wildcardPath', (req: Request<AliasParams>, res) => {
const { alias } = req.params;
const wildcardPath = req.params[0] || '';
let { wildcardPath } = req.params;
if (Array.isArray(wildcardPath)) {
wildcardPath = wildcardPath.join('/');
}
const configuration = Env.ALIASED_CONFIGURATIONS[alias];
if (!configuration || !configuration.uuid || !configuration.password) {