Skip to content

Commit

Permalink
CC-32482: Added the protocol map.
Browse files Browse the repository at this point in the history
  • Loading branch information
abitskil committed Feb 28, 2024
1 parent 8dbf3a2 commit fdfd27a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ function getEnvVar(primary: string, fallback: string): string {
return process.env[primary] || process.env[fallback];
}

const protocol = getEnvVar('ENV_PROTOCOL', 'SPRYKER_SSL_ENABLE') == '1' ? 'https' : 'http';
const protocolMap = {
'1': 'https',
'0': 'http',
'http': 'http',
'https': 'https',
};
const protocol = protocolMap[getEnvVar('ENV_PROTOCOL', 'SPRYKER_SSL_ENABLE')];
const backofficeHost = getEnvVar('ENV_BACKOFFICE_HOST', 'SPRYKER_BE_HOST');
const merchantPortalHost = getEnvVar('ENV_MERCHANT_PORTAL_HOST', 'SPRYKER_MP_HOST');
const glueBackendHost = getEnvVar('ENV_GLUE_BACKEND_HOST', 'SPRYKER_GLUE_BACKEND_HOST');
Expand Down

0 comments on commit fdfd27a

Please sign in to comment.