Browse Source

Merge pull request #10902 from abpframework/liangshiwei/template

Update module template
pull/10906/head
maliming 5 years ago
committed by GitHub
parent
commit
36932bd1ba
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/MyProjectNameBlazorHostModule.cs
  2. 3
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/appsettings.json

7
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/MyProjectNameBlazorHostModule.cs

@ -48,6 +48,7 @@ using Volo.Abp.TenantManagement.Blazor.Server;
using Volo.Abp.TenantManagement.EntityFrameworkCore;
using Volo.Abp.Threading;
using Volo.Abp.UI.Navigation;
using Volo.Abp.UI.Navigation.Urls;
using Volo.Abp.VirtualFileSystem;
namespace MyCompanyName.MyProjectName.Blazor.Server.Host
@ -199,6 +200,12 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host
options.AppAssembly = typeof(MyProjectNameBlazorHostModule).Assembly;
});
Configure<AppUrlOptions>(options =>
{
options.Applications["MVC"].RootUrl = configuration["App:SelfUrl"];
options.RedirectAllowedUrls.AddRange(configuration["App:RedirectAllowedUrls"].Split(','));
});
#if DEBUG
context.Services.Replace(ServiceDescriptor.Singleton<IEmailSender, NullEmailSender>());
#endif

3
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/appsettings.json

@ -1,6 +1,7 @@
{
"App": {
"SelfUrl": "https://localhost:44313"
"SelfUrl": "https://localhost:44313",
"RedirectAllowedUrls": "https://localhost:44313"
},
"ConnectionStrings": {
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName_Unified;Trusted_Connection=True"

Loading…
Cancel
Save