From 245f13b83f95e3b7157d07964a59df98db114de0 Mon Sep 17 00:00:00 2001 From: Quildra Date: Wed, 20 Dec 2023 21:41:48 +0000 Subject: [PATCH] More compact and expandable token checker --- packages/bridge-ui/src/app/app.config.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/bridge-ui/src/app/app.config.ts b/packages/bridge-ui/src/app/app.config.ts index 9eac268..a1b34e1 100644 --- a/packages/bridge-ui/src/app/app.config.ts +++ b/packages/bridge-ui/src/app/app.config.ts @@ -31,12 +31,12 @@ export const appConfig: ApplicationConfig = { allowedList: [ { uriMatcher: (uri) => { - let is_create = uri.match('.+\/create'); - let is_update = uri.match('.+\/update'); - let is_delete = uri.match('.+\/delete'); - let is_login = uri.match('.+\/login'); - let is_claim = uri.match('.+\/claim-racer'); - return is_create != null || is_update != null || is_delete != null || is_claim != null; + let needs_token = uri.match('.+\/create') != null; + needs_token ||= uri.match('.+\/update') != null; + needs_token ||= uri.match('.+\/delete') != null; + needs_token ||= uri.match('.+\/login') != null; + needs_token ||= uri.match('.+\/claim-racer') != null; + return needs_token; }, tokenOptions: { authorizationParams: {