Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ import { isLabeuEnvironment, isProdEnvironment } from './environment';
export { isProdEnvironment };

const getWillPaymentUrl = (): string => {
/** In preprod and prod environments, use a relative path to mitigate potential DDOS attacks */
if (isProdEnvironment()) {
return '/order/payment/assets/remoteEntry.js';
// ISO date prefix truncated to the minute: "2026-06-26T14:30"
// Used as CDN cache-busting query parameter (duplicated from Manager/billing pattern)
const minute = new Date().toISOString().slice(0, 16);

/** In known OVHcloud environments (production and labeu), use a relative path to mitigate potential DDOS attacks */
if (isProdEnvironment() || isLabeuEnvironment()) {
return `/payment/assets/remoteEntry.js?v=${minute}`;
}

return (
(isLabeuEnvironment() && import.meta.env.VITE_WP_LABEU_ENTRY_POINT) ||
'https://www.ovhcloud.com/order/payment/assets/remoteEntry.js'
);
return `https://www.ovhcloud.com/payment/assets/remoteEntry.js?v=${minute}`;
};

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ const getWillPaymentUrl = () => {
if (isLabeuEnvironment()) {
return (
getLabeuEntryPoint() ||
'https://www.ovhcloud.com/order/payment/assets/remoteEntry.js'
'https://www.ovhcloud.com/payment/assets/remoteEntry.js'
);
}

return 'https://www.ovhcloud.com/order/payment/assets/remoteEntry.js';
return 'https://www.ovhcloud.com/payment/assets/remoteEntry.js';
};

exports.isLabeuEnvironment = isLabeuEnvironment;
Expand Down
Loading