diff options
Diffstat (limited to 'src/Support/Parser.php')
| -rw-r--r-- | src/Support/Parser.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/Support/Parser.php b/src/Support/Parser.php index 02ec251..c432240 100644 --- a/src/Support/Parser.php +++ b/src/Support/Parser.php @@ -33,10 +33,18 @@ class Parser $name = ""; $server = ""; + if (str_starts_with($alias, "#")) { + $alias = substr($alias, 1); + } + $parts = explode(":", $alias); - $name = substr($parts[0], 1); + $name = $parts[0]; $server = $parts[1]; + if ($server === "localhost" && str_starts_with($_ENV["DOMAIN"], "localhost")) { + $server = $_ENV["DOMAIN"]; + } + return [ "name" => $name, "server" => $server, |
