mirror of
				https://github.com/nsnail/Ocelot.git
				synced 2025-11-04 20:10:50 +08:00 
			
		
		
		
	Fix issue #1088 (Ocelot Administration doesn't work with .NET Core 3.x)
Fixed OcelotMiddlewareConfigurationDelegate configuration
This commit is contained in:
		@@ -3,11 +3,12 @@
 | 
				
			|||||||
    <TargetFramework>netcoreapp3.1</TargetFramework>
 | 
					    <TargetFramework>netcoreapp3.1</TargetFramework>
 | 
				
			||||||
  </PropertyGroup>
 | 
					  </PropertyGroup>
 | 
				
			||||||
  <ItemGroup>
 | 
					  <ItemGroup>
 | 
				
			||||||
    <Folder Include="wwwroot\"/>
 | 
					    <Folder Include="wwwroot\" />
 | 
				
			||||||
  </ItemGroup>
 | 
					  </ItemGroup>
 | 
				
			||||||
  <ItemGroup>
 | 
					  <ItemGroup>
 | 
				
			||||||
    <PackageReference Include="Microsoft.AspNetCore.App"/>
 | 
					    <PackageReference Include="Ocelot" Version="14.0.3" />
 | 
				
			||||||
    <PackageReference Include="Ocelot" Version="12.0.1"/>
 | 
					  </ItemGroup>
 | 
				
			||||||
    <PackageReference Include="Ocelot.Administration" Version="0.1.0"/>
 | 
					  <ItemGroup>
 | 
				
			||||||
 | 
					    <ProjectReference Include="..\..\src\Ocelot.Administration\Ocelot.Administration.csproj" />
 | 
				
			||||||
  </ItemGroup>
 | 
					  </ItemGroup>
 | 
				
			||||||
</Project>
 | 
					</Project>
 | 
				
			||||||
@@ -1,15 +1,10 @@
 | 
				
			|||||||
using System;
 | 
					using Microsoft.AspNetCore.Hosting;
 | 
				
			||||||
using System.Collections.Generic;
 | 
					 | 
				
			||||||
using System.IO;
 | 
					 | 
				
			||||||
using System.Linq;
 | 
					 | 
				
			||||||
using System.Threading.Tasks;
 | 
					 | 
				
			||||||
using Microsoft.AspNetCore;
 | 
					 | 
				
			||||||
using Microsoft.AspNetCore.Hosting;
 | 
					 | 
				
			||||||
using Microsoft.Extensions.Configuration;
 | 
					using Microsoft.Extensions.Configuration;
 | 
				
			||||||
using Microsoft.Extensions.Logging;
 | 
					using Microsoft.Extensions.Logging;
 | 
				
			||||||
 | 
					using Ocelot.Administration;
 | 
				
			||||||
using Ocelot.DependencyInjection;
 | 
					using Ocelot.DependencyInjection;
 | 
				
			||||||
using Ocelot.Middleware;
 | 
					using Ocelot.Middleware;
 | 
				
			||||||
using Ocelot.Administration;
 | 
					using System.IO;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AdministrationApi
 | 
					namespace AdministrationApi
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -27,7 +27,13 @@
 | 
				
			|||||||
                    }
 | 
					                    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    app.UseAuthentication();
 | 
					                    app.UseAuthentication();
 | 
				
			||||||
                    app.UseMvc();
 | 
					                    app.UseRouting();
 | 
				
			||||||
 | 
					                    app.UseAuthorization();
 | 
				
			||||||
 | 
					                    app.UseEndpoints(endpoints =>
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        endpoints.MapDefaultControllerRoute();
 | 
				
			||||||
 | 
					                        endpoints.MapControllers();
 | 
				
			||||||
 | 
					                    });
 | 
				
			||||||
                });
 | 
					                });
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user