Browse Source

Update Startup.cs

pull/1/head
Sebastian Stehle 9 years ago
committed by GitHub
parent
commit
b8d2ceb2d0
  1. 11
      src/Squidex/Startup.cs

11
src/Squidex/Startup.cs

@ -152,15 +152,20 @@ namespace Squidex
app.UseWebpackProxy(); app.UseWebpackProxy();
app.Use((context, next) => { app.Use((context, next) => {
context.Request.Path = new PathString("/index.html"); if (context.Response.StatusCode == 404 && !Path.HasExtension(context.Request.Path.Value))
{
context.Request.Path = new PathString("/index.html");
}
return next(); return next();
}); });
} }
else else
{ {
app.Use((context, next) => { app.Use((context, next) => {
context.Request.Path = new PathString("/build/index.html"); if (context.Response.StatusCode == 404 && !Path.HasExtension(context.Request.Path.Value))
{
context.Request.Path = new PathString("/build/index.html");
}
return next(); return next();
}); });

Loading…
Cancel
Save