backend-app-api: fix HttpRouter credentials barrier

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2024-02-17 01:16:22 +01:00
parent cacf422f1f
commit 663fce7457
@@ -73,9 +73,9 @@ export function createCredentialsBarrier(options: {
unauthenticatedPredicates.push(createPathPolicyPredicate(policy.path));
} else if (policy.allow === 'user-cookie') {
cookiePredicates.push(createPathPolicyPredicate(policy.path));
} else {
throw new Error('Invalid auth policy');
}
throw new Error('Invalid auth policy');
};
return { middleware, addAuthPolicy };