From 087b71ab866a347476b59733a240b03fd22e834d Mon Sep 17 00:00:00 2001 From: imayblum <112187603+imayblum@users.noreply.github.com> Date: Mon, 24 Jun 2024 21:24:02 -0700 Subject: [PATCH] eu regional support (#120) --- cypress/support/commands.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cypress/support/commands.ts b/cypress/support/commands.ts index 1d70fc8..558d523 100644 --- a/cypress/support/commands.ts +++ b/cypress/support/commands.ts @@ -2,10 +2,12 @@ // *********************************************** const projectId = Cypress.env('descope_project_id') -const managementKey = Cypress.env('descope_management_key') -const descopeAPIDomain = "api.descope.com" - - +const managementKey = Cypress.env('descope_management_key') +let descopeAPIDomain = "api.descope.com" +if (projectId.length >= 32) { + const localURL = projectId.substring(1, 5) + descopeAPIDomain = [descopeAPIDomain.slice(0, 4), localURL, ".", descopeAPIDomain.slice(4)].join('') +} // Define the authorization header const authHeader = {