开启token

This commit is contained in:
yanghongwei 2025-04-02 23:12:16 +08:00
parent 00e5326c26
commit 8e7b875aaa
1 changed files with 4 additions and 4 deletions

View File

@ -103,10 +103,10 @@ app.UseStaticFiles(new StaticFileOptions()
RequestPath = "/upload"
});
// Configure the HTTP request pipeline.
//if (app.Environment.IsDevelopment())
//{
if (app.Environment.IsDevelopment())
{
//}
}
app.UseSwagger();
app.UseSwaggerUI();
//路由匹配
@ -117,7 +117,7 @@ app.UseCors("CorsPolicy");
//异常中间件
app.UseMiddleware<CustomErrorMiddleware>();
//token验证中间件
//app.UseMiddleware<TokenValidationMiddleware>();
app.UseMiddleware<TokenValidationMiddleware>();
//执行匹配的端点
app.UseEndpoints(endpoints =>
{