访问拦截信息设置UTF-8编码

This commit is contained in:
智能大石头 2024-08-14 08:27:09 +08:00
parent 2f9ed799c5
commit 432d0aa24f
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ public class RunTimeMiddleware
else if (rule.BlockCode > 0)
{
ctx.Response.StatusCode = rule.BlockCode;
ctx.Response.ContentType = "text/html";
ctx.Response.ContentType = "text/html; charset=utf-8";
await ctx.Response.WriteAsync(rule.BlockContent);
await ctx.Response.CompleteAsync();
}