OcelotDemo
OcelotDemo copied to clipboard
Ocelot简易教程中使用的实例代码
错误:  问题我已经在博客园上提出博问了,但是好像并没有解决,地址我先给贴出来 https://q.cnblogs.com/q/129187/
你博客文章是ids4授权服务路径是http://localhost:5000/connect/token 但是如果我ids4授权服务路径是http://localhost:5000/tokenserver/connect/token ocelot怎么配置呢?
我的ocelot版本是12.0.1 那么program.cs文件中应该为: public static IWebHostBuilder CreateWebHostBuilder(string[] args) => WebHost.CreateDefaultBuilder(args) .ConfigureAppConfiguration((hostingContext, config) => { config .SetBasePath(hostingContext.HostingEnvironment.ContentRootPath) .AddJsonFile("appsettings.json", true, true) .AddJsonFile($"appsettings.{hostingContext.HostingEnvironment.EnvironmentName}.json", true, true) .AddOcelot(hostingContext.HostingEnvironment) .AddEnvironmentVariables(); }) .UseStartup();