feat(MED-131): remove fake url

This commit is contained in:
2025-08-04 17:56:04 +03:00
parent 77d58ef5b1
commit edfc9776d3
2 changed files with 3 additions and 8 deletions

View File

@@ -14,11 +14,6 @@ const siteUrl = process.env.NEXT_PUBLIC_SITE_URL!;
const ANALYSIS_PACKAGES_TYPE_HANDLE = 'analysis-packages';
const MONTONIO_PAID_STATUS = 'PAID';
/**
* This is needed locally, because Montonio doesn't accept "localhost" redirect/notification URLs
*/
const LOCAL_MONTONIO_REDIRECT_FAKE_ORIGIN = 'webhook.site';
const env = z
.object({
emailSender: z
@@ -109,7 +104,7 @@ const handleOrderToken = async (orderToken: string) => {
export async function GET(request: Request) {
const { language } = await createI18nServerInstance();
const baseUrl = new URL(env.siteUrl.replace("localhost", LOCAL_MONTONIO_REDIRECT_FAKE_ORIGIN));
const baseUrl = new URL(env.siteUrl);
try {
const orderToken = new URL(request.url).searchParams.get('order-token');
if (!orderToken) {