SKE-57 deploy app - changes

This commit is contained in:
Przemysław Stawujak 2018-12-28 17:37:52 +01:00
parent 6f0a565558
commit b8d56680a5
3 changed files with 23 additions and 1 deletions

View File

@ -0,0 +1,4 @@
{
"remoteServiceBaseUrl": "https://edukwiz.projektstudencki.pl",
"appBaseUrl": "https://edukwiz.projektstudencki.pl"
}

View File

@ -16,6 +16,7 @@ using SystemKonkursow.Configuration;
using SystemKonkursow.Identity;
using Abp.AspNetCore.SignalR.Hubs;
using System.IO;
namespace SystemKonkursow.Web.Host.Startup
{
@ -87,11 +88,27 @@ namespace SystemKonkursow.Web.Host.Startup
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseAbp(options => { options.UseAbpRequestLocalization = false; }); // Initializes ABP framework.
app.UseCors(_defaultCorsPolicyName); // Enable CORS!
app.UseStaticFiles();
app.UseFileServer();
app.Use(async (context, next) => {
await next();
if (context.Response.StatusCode == 404 &&
!Path.HasExtension(context.Request.Path.Value) &&
!context.Request.Path.Value.StartsWith("/api/"))
{
context.Request.Path = "/index.html";
await next();
}
});
app.UseAuthentication();

View File

@ -52,4 +52,5 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
</ItemGroup>
<ProjectExtensions><VisualStudio><UserProperties appsettings_1json__JSONSchema="" /></VisualStudio></ProjectExtensions>
</Project>