Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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 = "/";
- await next();
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement