diff --git a/app/Console/Commands/MigrateEnvReverb.php b/app/Console/Commands/MigrateEnvReverb.php index fdf7172..82eb0b3 100644 --- a/app/Console/Commands/MigrateEnvReverb.php +++ b/app/Console/Commands/MigrateEnvReverb.php @@ -38,14 +38,20 @@ class MigrateEnvReverb extends Command return self::SUCCESS; } - $viteHost = $this->extractVar($content, 'VITE_REVERB_HOST'); - if ($viteHost === '${REVERB_HOST}' || $viteHost === $appHost) { + $scheme = $this->detectScheme($appHost, $content); + $correctPort = $scheme === 'https' ? '443' : '80'; + $viteHost = $this->extractVar($content, 'VITE_REVERB_HOST'); + $currentPort = $this->extractVar($content, 'REVERB_PORT'); + + $hostOk = ($viteHost === '${REVERB_HOST}' || $viteHost === $appHost); + $portOk = ($currentPort === $correctPort); + + if ($hostOk && $portOk) { $this->info('REVERB-Werte bereits korrekt.'); return self::SUCCESS; } - $scheme = $this->detectScheme($appHost, $content); - $port = $scheme === 'https' ? '443' : '80'; + $port = $correctPort; $fixes = [ 'REVERB_HOST' => '${APP_HOST}',