Browse Source

Merge pull request #21363 from abpframework/AbpMvcLibsService

Skip to check libs for `ajax` request.
pull/21364/head
liangshiwei 2 years ago
committed by GitHub
parent
commit
75eb62eabb
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Libs/AbpMvcLibsService.cs

2
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Libs/AbpMvcLibsService.cs

@ -34,7 +34,7 @@ public class AbpMvcLibsService : IAbpMvcLibsService, ITransientDependency
app.Use(async (httpContext, next) =>
{
if (!await CheckLibsAsyncOnceAsync(httpContext))
if (!httpContext.Request.IsAjax() && !await CheckLibsAsyncOnceAsync(httpContext))
{
var errorPage = new AbpMvcLibsErrorPage();
await errorPage.ExecuteAsync(httpContext);

Loading…
Cancel
Save