From 2f10b2340066280e442bbf56acd3e5f98510abc3 Mon Sep 17 00:00:00 2001 From: Yashwin Date: Tue, 3 Feb 2026 19:27:35 +0530 Subject: [PATCH] Add fetch request with custom headers in Modules component before opening launch URL. This ensures proper handling of tunnel reminders for super admins while maintaining existing functionality. --- src/pages/tenant/Modules.tsx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/pages/tenant/Modules.tsx b/src/pages/tenant/Modules.tsx index 90c0fd4..fb97db1 100644 --- a/src/pages/tenant/Modules.tsx +++ b/src/pages/tenant/Modules.tsx @@ -80,6 +80,20 @@ const Modules = (): ReactElement => { const launchTenantId = isSuperAdmin ? tenantId : null; const response = await moduleService.launch(moduleId, launchTenantId); if (response.success && response.data.launch_url) { + // Make a fetch request with custom headers first + try { + await fetch(response.data.launch_url, { + method: 'GET', + headers: { + 'bypass-tunnel-reminder': 'true', + }, + credentials: 'include', + }); + } catch (fetchError) { + // Ignore fetch errors, we'll still open the URL + console.warn('Failed to send header request:', fetchError); + } + // Open the URL in a new tab window.open(response.data.launch_url, '_blank', 'noopener,noreferrer'); } } catch (err: any) {