Skip to content

Commit 20938e0

Browse files
FabienHenonseven-amid
authored andcommitted
feat(pci-project): set WP path from env vars
ref: #MANAGER-20492 Signed-off-by: Fabien Henon <[email protected]>
1 parent 6f491b6 commit 20938e0

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

packages/manager/apps/pci-project/src/utils/module-federation-runtime.ts

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,8 @@
11
import { init } from '@module-federation/runtime';
22

3-
const isLabeuEnvironment = /\.labeu\./.test(window.location.hostname);
4-
5-
const isStagingEnvironment = /\.dtci\./.test(window.location.hostname);
6-
7-
const getWillPaymentUrl = () => {
8-
if (isLabeuEnvironment) {
9-
return 'https://www.build-ovh.com/order/payment/assets/remoteEntry.js';
10-
}
11-
if (isStagingEnvironment) {
12-
return 'https://ovhcloudcomdev.static.ovh.net/order/payment/assets/remoteEntry.js';
13-
}
14-
return 'https://www.ovhcloud.com/order/payment/assets/remoteEntry.js';
15-
};
3+
const getWillPaymentUrl = () =>
4+
import.meta.env.VITE_WP_ENTRY_POINT ||
5+
'https://www.ovhcloud.com/order/payment/assets/remoteEntry.js';
166

177
/**
188
* Initialize Module Federation runtime

0 commit comments

Comments
 (0)