diff --git a/backend/controller/controller.go b/backend/controller/controller.go index 9f07e9b1c9..b593c69197 100644 --- a/backend/controller/controller.go +++ b/backend/controller/controller.go @@ -86,7 +86,7 @@ func Start(ctx context.Context, config Config, runnerScaling scaling.RunnerScali _, _ = w.Write([]byte("Console not installed.")) }) } else { - consoleHandler, err = frontend.Server(ctx, config.ContentTime, config.ConsoleURL) + consoleHandler, err = frontend.Server(ctx, config.Bind, config.ConsoleURL) if err != nil { return err } diff --git a/frontend/local.go b/frontend/local.go index f96c6b0919..9253d016a0 100644 --- a/frontend/local.go +++ b/frontend/local.go @@ -7,17 +7,16 @@ import ( "net/http" "net/http/httputil" "net/url" - "time" "github.com/TBD54566975/ftl/internal/cors" "github.com/TBD54566975/ftl/internal/exec" "github.com/TBD54566975/ftl/internal/log" ) -var consoleURL, _ = url.Parse("http://localhost:5173") -var proxy = httputil.NewSingleHostReverseProxy(consoleURL) +var proxyURL, _ = url.Parse("http://localhost:5173") +var proxy = httputil.NewSingleHostReverseProxy(proxyURL) -func Server(ctx context.Context, timestamp time.Time, allowOrigin *url.URL) (http.Handler, error) { +func Server(ctx context.Context, publicURL *url.URL, allowOrigin *url.URL) (http.Handler, error) { logger := log.FromContext(ctx) logger.Debugf("Building console...") @@ -30,7 +29,7 @@ func Server(ctx context.Context, timestamp time.Time, allowOrigin *url.URL) (htt if err != nil { return nil, err } - logger.Infof("Web console available at: %s", consoleURL) + logger.Infof("Web console available at: %s", publicURL) if allowOrigin == nil { return proxy, nil