feat: 合并提交

This commit is contained in:
ccnetcore
2026-01-10 15:40:54 +08:00
parent 3c9c882c42
commit 05b81b710f
3 changed files with 8 additions and 7 deletions

View File

@@ -133,7 +133,7 @@ namespace Yi.Abp.Web
//采用furion格式的规范化api默认不开启使用abp优雅的方式
//前置需要将管道工作单元前加上app.Properties.Add("_AbpExceptionHandlingMiddleware_Added",false);
//你没看错。。。
//service.AddFurionUnifyResultApi();
service.AddFurionUnifyResultApi();
//配置错误处理显示详情
Configure<AbpExceptionHandlingOptions>(options => { options.SendExceptionsDetailsToClients = true; });
@@ -272,6 +272,7 @@ namespace Yi.Abp.Web
{
options.TokenValidationParameters = new TokenValidationParameters
{
RoleClaimType = "Roles",
ClockSkew = TimeSpan.Zero,
ValidateIssuerSigningKey = true,
ValidIssuer = jwtOptions.Issuer,
@@ -290,7 +291,8 @@ namespace Yi.Abp.Web
}
else
{
if (messageContext.Request.Cookies.TryGetValue("Token", out var cookiesToken))
if (!messageContext.Request.Headers.ContainsKey("Authorization") &&
messageContext.Request.Cookies.TryGetValue("Token", out var cookiesToken))
{
messageContext.Token = cookiesToken;
}
@@ -395,7 +397,7 @@ namespace Yi.Abp.Web
app.UseDefaultFiles();
app.UseDirectoryBrowser("/api/app/wwwroot");
//app.Properties.Add("_AbpExceptionHandlingMiddleware_Added",false);
app.Properties.Add("_AbpExceptionHandlingMiddleware_Added",false);
//工作单元
app.UseUnitOfWork();

View File

@@ -10,8 +10,7 @@ VITE_DEVTOOLS=false
VITE_INJECT_APP_LOADING=true
# 后台请求路径 具体在vite.config.mts配置代理
# VITE_GLOB_API_URL=http://101.37.70.137:19001/api/app
VITE_GLOB_API_URL=http://192.168.1.101:19001/api/app
VITE_GLOB_API_URL=http://localhost:19001/api/app
# 全局加密开关(即开启了加解密功能才会生效 不是全部接口加密 需要和后端对应)
VITE_GLOB_ENABLE_ENCRYPT=false

View File

@@ -27,7 +27,7 @@ export default defineConfig(async () => {
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''),
// mock代理目标地址
target: 'http://101.37.70.137:19001/api/app',
target: 'http://localhost:19001/api/app',
ws: true,
},
},