Make Elsa server URL configurable in ASPNET Core sample dashboard project

This commit is contained in:
Sipke Schoorstra 2021-04-14 14:44:58 +02:00
parent a4c53f64e9
commit 43b2bef1a5
4 changed files with 11 additions and 5 deletions

View file

@ -1,7 +1,8 @@
@page "/"
@inject IConfiguration Configuration;
@{
ViewData["Title"] = "Home page";
var serverUrl = "/";
var serverUrl = Configuration["Elsa:Server:BaseAddress"];
}
<!DOCTYPE html>
<html lang="en">

View file

@ -1,2 +1,3 @@
@using Microsoft.Extensions.Configuration
@namespace ElsaDashboard.Samples.AspNetCore.Monolith.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

View file

@ -3,8 +3,7 @@
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:15265",
"sslPort": 44321
"applicationUrl": "https://localhost:15265"
}
},
"profiles": {
@ -19,7 +18,7 @@
"commandName": "Project",
"dotnetRunMessages": "true",
"launchBrowser": true,
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"applicationUrl": "https://localhost:15265",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}

View file

@ -6,5 +6,10 @@
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*"
"AllowedHosts": "*",
"Elsa": {
"Server": {
"BaseAddress": "https://localhost:15265"
}
}
}