diff --git a/src/Squidex/Startup.cs b/src/Squidex/Startup.cs index ffb910f47..0ab3d8143 100644 --- a/src/Squidex/Startup.cs +++ b/src/Squidex/Startup.cs @@ -7,6 +7,7 @@ // ========================================================================== using System; +using System.IO; using Autofac; using Autofac.Extensions.DependencyInjection; using Microsoft.AspNetCore.Builder; @@ -152,15 +153,20 @@ namespace Squidex app.UseWebpackProxy(); app.Use((context, next) => { - context.Request.Path = new PathString("/index.html"); - + if (!Path.HasExtension(context.Request.Path.Value)) + { + context.Request.Path = new PathString("/index.html"); + } return next(); }); } else { app.Use((context, next) => { - context.Request.Path = new PathString("/build/index.html"); + if (!Path.HasExtension(context.Request.Path.Value)) + { + context.Request.Path = new PathString("/build/index.html"); + } return next(); }); diff --git a/src/Squidex/package.json b/src/Squidex/package.json index 245a9c165..d55688428 100644 --- a/src/Squidex/package.json +++ b/src/Squidex/package.json @@ -10,7 +10,7 @@ "test:clean": "rimraf _test-output", "dev": "cpx node_modules/oidc-client/dist/oidc-client.min.js wwwroot/scripts/ & webpack-dev-server --inline --hot --port 3000", "build": "webpack --config app-config/webpack.prod.js --bail", - "build:copy": "cpx node_modules/oidc-client/dist/oidc-client.min.js", + "build:copy": "cpx node_modules/oidc-client/dist/oidc-client.min.js wwwroot/scripts/", "build:clean": "rimraf wwwroot/build" }, "dependencies": {