跨域测试

Test.EIImageViewer
hang 2022-11-23 18:21:25 +08:00
parent dcf7368ec7
commit f59d1533fc
3 changed files with 9 additions and 7 deletions

View File

@ -23,7 +23,7 @@ namespace IRaCIS.Core.API
}
[AllowAnonymous]
[EnableCors]
[DisableCors]
public class UploadHub : Hub<IUploadClient>
{

View File

@ -164,15 +164,14 @@ namespace IRaCIS.Core.API
app.UseForwardedHeaders();
app.UseCors(t => t.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader());
//响应压缩
app.UseResponseCompression();
//app.UseCors(t => t.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader());
//不需要 token 访问的静态文件 wwwroot css, JavaScript, and images don't require authentication.
app.UseStaticFiles();
app.UseIRacisHostStaticFileStore(env);
//LogDashboard
app.UseLogDashboard("/LogDashboard");
@ -212,7 +211,10 @@ namespace IRaCIS.Core.API
app.UseRouting();
//app.UseCors(t => t.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader());
app.UseCors(t => t.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader());
app.UseIRacisHostStaticFileStore(env);
app.UseAuthentication();

View File

@ -58,7 +58,7 @@ namespace IRaCIS.Core.Application
.Where( t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
.Where(t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId))
.SelectMany(t => t.TrialDocConfirmedUserList)
.CountAsync(t => t.ConfirmUserId == _userInfo.Id),
.CountAsync(t => t.ConfirmUserId == _userInfo.Id && t.ConfirmTime !=null),
TotalNeedSignSystemDocCount = _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SuperAdmin
? 0
@ -73,7 +73,7 @@ namespace IRaCIS.Core.Application
: await _systemDocumentRepository
.Where(t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId))
.SelectMany(t => t.SystemDocConfirmedUserList)
.CountAsync(t => t.ConfirmUserId == _userInfo.Id),
.CountAsync(t => t.ConfirmUserId == _userInfo.Id && t.ConfirmTime != null),
TotalApprovalRequiredCount=
_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.APM ?