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