diff --git a/resources/views/admin/ads/index.blade.php b/resources/views/admin/ads/index.blade.php index 95c834d..397d617 100644 --- a/resources/views/admin/ads/index.blade.php +++ b/resources/views/admin/ads/index.blade.php @@ -875,6 +875,11 @@ $baseRoute = 'admin.data-config.advertisements'; async fetchPage(url) { if (!url || url === window.location.href) return; + const urlObj = new URL(url, window.location.origin); + if (urlObj.host === window.location.host) { + urlObj.protocol = window.location.protocol; + } + url = urlObj.toString(); this.isLoading = true; try { @@ -1481,4 +1486,4 @@ $baseRoute = 'admin.data-config.advertisements'; })); }); -@endsection \ No newline at end of file +@endsection diff --git a/resources/views/admin/products/index.blade.php b/resources/views/admin/products/index.blade.php index b022608..3b94873 100644 --- a/resources/views/admin/products/index.blade.php +++ b/resources/views/admin/products/index.blade.php @@ -1023,6 +1023,9 @@ hover:bg-slate-100 dark:hover:bg-white/5 rounded-lg flex items-center justify-be } else { // Ensure URL has tab and _ajax params const urlObj = new URL(url, window.location.origin); + if (urlObj.host === window.location.host) { + urlObj.protocol = window.location.protocol; + } urlObj.searchParams.set('tab', tab); urlObj.searchParams.set('_ajax', '1'); url = urlObj.toString();