diff --git a/src/apps/Elsa.ServerAndStudio.Web/Pages/_Host.cshtml b/src/apps/Elsa.ServerAndStudio.Web/Pages/_Host.cshtml index c2217d30d..a335e4c85 100644 --- a/src/apps/Elsa.ServerAndStudio.Web/Pages/_Host.cshtml +++ b/src/apps/Elsa.ServerAndStudio.Web/Pages/_Host.cshtml @@ -3,8 +3,7 @@ @inject IConfiguration Configuration; @{ var baseUrl = Configuration["Hosting:BaseUrl"]!; - var apiUrl = baseUrl + Url.Content("~/elsa/api"); - var basePath = Configuration["Hosting:BasePath"]!; + var apiUrl = Configuration["Hosting:ApiUrl"]!; } @@ -15,20 +14,20 @@ Elsa Studio 3.0 - - - - + + + + - - - - + + + + @@ -44,19 +43,19 @@ Reload 🗙 - - - - - - + + + + + + - + \ No newline at end of file diff --git a/src/apps/Elsa.ServerAndStudio.Web/Program.cs b/src/apps/Elsa.ServerAndStudio.Web/Program.cs index 581f25ec5..fb43aa4cd 100644 --- a/src/apps/Elsa.ServerAndStudio.Web/Program.cs +++ b/src/apps/Elsa.ServerAndStudio.Web/Program.cs @@ -130,7 +130,11 @@ services if (useCaching) http.UseCache(); - http.ConfigureHttpOptions = options => configuration.GetSection("Http").Bind(options); + http.ConfigureHttpOptions = options => + { + options.BaseUrl = new Uri(configuration["Hosting:BaseUrl"]!); + options.BasePath = configuration["Http:BasePath"]; + }; }) .UseEmail(email => email.ConfigureOptions = options => configuration.GetSection("Smtp").Bind(options)) .UseWebhooks(webhooks => webhooks.ConfigureSinks = options => builder.Configuration.GetSection("Webhooks:Sinks").Bind(options)) diff --git a/src/apps/Elsa.ServerAndStudio.Web/appsettings.json b/src/apps/Elsa.ServerAndStudio.Web/appsettings.json index 0e85580b3..56cfb0e9c 100644 --- a/src/apps/Elsa.ServerAndStudio.Web/appsettings.json +++ b/src/apps/Elsa.ServerAndStudio.Web/appsettings.json @@ -18,7 +18,7 @@ "DatabaseProvider": "Sqlite", "Hosting": { "BaseUrl": "https://localhost:8080", - "BasePath": "" + "ApiUrl": "https://localhost:8080/elsa/api" }, "Identity": { "Tokens": { @@ -81,7 +81,6 @@ "DefaultSender": "noreply@crmservices.com" }, "Http": { - "BaseUrl": "https://localhost:5001", "BasePath": "/api/workflows" }, "Webhooks": {