开启token
This commit is contained in:
parent
00e5326c26
commit
8e7b875aaa
|
|
@ -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 =>
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue