app->environment('local', 'production')) { URL::forceScheme('https'); } // Trust proxies for correct request detection $this->app['request']->server->set('HTTPS', 'on'); // Set dynamic asset URL based on current domain/theme // This is needed for Vite to use the correct asset subdomain //config(['app.asset_url' => 'https://assets.businessportal24.test']); //$this->setDynamicAssetUrl(); } /** * Set the asset URL dynamically based on the current theme */ protected function setDynamicAssetUrl(): void { try { $assetUrl = \App\Helpers\ThemeHelper::getAssetUrl(); config(['app.asset_url' => $assetUrl]); } catch (\Exception $e) { // Fallback to default if theme detection fails config(['app.asset_url' => 'https://assets.pr-copilot.test']); } } }