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