File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ import (
27
27
"github.com/symfony-cli/console"
28
28
"github.com/symfony-cli/symfony-cli/envs"
29
29
"github.com/symfony-cli/symfony-cli/local/pid"
30
+ "github.com/symfony-cli/symfony-cli/local/proxy"
31
+ "github.com/symfony-cli/symfony-cli/util"
30
32
"github.com/symfony-cli/terminal"
31
33
)
32
34
@@ -60,9 +62,16 @@ var projectLocalOpenCmd = &console.Command{
60
62
if ! pidFile .IsRunning () {
61
63
return console .Exit ("Local web server is down." , 1 )
62
64
}
63
- abstractOpenCmd (fmt .Sprintf ("%s://127.0.0.1:%d/%s" ,
65
+ host := fmt .Sprintf ("127.0.0.1:%d" , pidFile .Port )
66
+ if proxyConf , err := proxy .Load (util .GetHomeDir ()); err == nil {
67
+ domains := proxyConf .GetDomains (projectDir )
68
+ if len (domains ) > 0 {
69
+ host = domains [0 ]
70
+ }
71
+ }
72
+ abstractOpenCmd (fmt .Sprintf ("%s://%s/%s" ,
64
73
pidFile .Scheme ,
65
- pidFile . Port ,
74
+ host ,
66
75
strings .TrimLeft (c .String ("path" ), "/" ),
67
76
))
68
77
return nil
You can’t perform that action at this time.
0 commit comments