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