fix(core): Fix issue with falsely skip authorizing (#3087)

This commit is contained in:
Omar Ajoue 2022-04-06 13:55:10 +02:00 committed by GitHub
parent 4af5168b3b
commit 358a683f38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -201,7 +201,7 @@ export async function checkPermissionsForExecution(
export function isAuthExcluded(url: string, ignoredEndpoints: string[]): boolean { export function isAuthExcluded(url: string, ignoredEndpoints: string[]): boolean {
return !!ignoredEndpoints return !!ignoredEndpoints
.filter(Boolean) // skip empty paths .filter(Boolean) // skip empty paths
.find((ignoredEndpoint) => url.includes(ignoredEndpoint)); .find((ignoredEndpoint) => url.startsWith(`/${ignoredEndpoint}`));
} }
/** /**