diff --git a/includes/Admin/Assets.php b/includes/Admin/Assets.php index f781833..5c9f16c 100644 --- a/includes/Admin/Assets.php +++ b/includes/Admin/Assets.php @@ -289,7 +289,17 @@ class Assets { /** Dev server URL (filterable) */ private static function dev_server_url(): string { - $default = 'http://localhost:5173'; + // Auto-detect based on current host (for Local by Flywheel compatibility) + $host = $_SERVER['HTTP_HOST'] ?? 'localhost'; + $protocol = is_ssl() ? 'https' : 'http'; + + // If using *.local domain (Local by Flywheel), use HTTPS + if (strpos($host, '.local') !== false) { + $protocol = 'https'; + } + + $default = $protocol . '://' . $host . ':5173'; + /** Filter: change dev server URL if needed */ return (string) apply_filters('woonoow/admin_dev_server', $default); } diff --git a/includes/Admin/StandaloneAdmin.php b/includes/Admin/StandaloneAdmin.php index 75c17f5..770d8e1 100644 --- a/includes/Admin/StandaloneAdmin.php +++ b/includes/Admin/StandaloneAdmin.php @@ -108,9 +108,6 @@ class StandaloneAdmin { } ?> - - - + + +