committed by
GitHub
15 changed files with 4 additions and 2242 deletions
@ -1,83 +0,0 @@ |
|||||
|
|
||||
using System; |
|
||||
using System.Collections.Generic; |
|
||||
using System.IO; |
|
||||
using System.Linq; |
|
||||
using System.Text.RegularExpressions; |
|
||||
using System.Threading; |
|
||||
using Castle.Core.Logging; |
|
||||
using Microsoft.AspNetCore.Hosting; |
|
||||
using Microsoft.Extensions.Configuration; |
|
||||
using Microsoft.Extensions.Configuration.Memory; |
|
||||
using Newtonsoft.Json; |
|
||||
using Ocelot.Configuration.File; |
|
||||
using Serilog; |
|
||||
using Serilog.Core; |
|
||||
|
|
||||
namespace Ocelot.DependencyInjection |
|
||||
{ |
|
||||
public static class ConfigurationBuilderExtensions |
|
||||
{ |
|
||||
public static IConfigurationBuilder AddAutoOcelotConfig(this IConfigurationBuilder builder, IWebHostEnvironment env) |
|
||||
{ |
|
||||
return builder.AddAutoOcelotConfig(".", env); |
|
||||
} |
|
||||
|
|
||||
static object locker = new object(); |
|
||||
|
|
||||
public static IConfigurationBuilder AddAutoOcelotConfig(this IConfigurationBuilder builder, string folder, IWebHostEnvironment env) |
|
||||
{ |
|
||||
WriteFile(folder, env); |
|
||||
Action<object, FileSystemEventArgs> fileChanged = (sender, e) => |
|
||||
{ |
|
||||
lock (locker) |
|
||||
{ |
|
||||
Log.Debug("Ocelot config regenerate..."); |
|
||||
Thread.Sleep(100); //解决vs文件保存时多次触发change事件时引起异常
|
|
||||
WriteFile(folder, env); |
|
||||
} |
|
||||
}; |
|
||||
|
|
||||
FileSystemWatcher watcher = new FileSystemWatcher("OcelotConfig", "*.json"); |
|
||||
watcher.Changed += new FileSystemEventHandler(fileChanged); |
|
||||
watcher.Deleted += new FileSystemEventHandler(fileChanged); |
|
||||
watcher.Created += new FileSystemEventHandler(fileChanged); |
|
||||
watcher.Renamed += new RenamedEventHandler(fileChanged); |
|
||||
watcher.EnableRaisingEvents = true; |
|
||||
|
|
||||
builder.AddJsonFile("ocelot.json", optional: true, reloadOnChange: true); |
|
||||
return builder; |
|
||||
} |
|
||||
|
|
||||
private static void WriteFile(string folder, IWebHostEnvironment env) |
|
||||
{ |
|
||||
string excludeConfigName = ((env != null && env.EnvironmentName != null) ? ("ocelot." + env.EnvironmentName + ".json") : string.Empty); |
|
||||
Regex reg = new Regex("^ocelot\\.(.*?)\\.json$", RegexOptions.IgnoreCase | RegexOptions.Singleline); |
|
||||
List<FileInfo> list = (from fi in new DirectoryInfo(folder).EnumerateFiles() |
|
||||
where reg.IsMatch(fi.Name) && fi.Name != excludeConfigName |
|
||||
select fi).ToList(); |
|
||||
FileConfiguration fileConfiguration = new FileConfiguration(); |
|
||||
foreach (FileInfo item in list) |
|
||||
{ |
|
||||
if (list.Count <= 1 || !item.Name.Equals("ocelot.json", StringComparison.OrdinalIgnoreCase)) |
|
||||
{ |
|
||||
FileConfiguration fileConfiguration2 = JsonConvert.DeserializeObject<FileConfiguration>(File.ReadAllText(item.FullName)); |
|
||||
if (fileConfiguration2 == null) |
|
||||
{ |
|
||||
Log.Fatal($"Ocelot config file \"{item.FullName}\" is empty"); |
|
||||
} |
|
||||
if (item.Name.Equals("ocelot.global.json", StringComparison.OrdinalIgnoreCase)) |
|
||||
{ |
|
||||
fileConfiguration.GlobalConfiguration = fileConfiguration2.GlobalConfiguration; |
|
||||
} |
|
||||
|
|
||||
fileConfiguration.Aggregates.AddRange(fileConfiguration2.Aggregates); |
|
||||
fileConfiguration.Routes.AddRange(fileConfiguration2.Routes); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
string contents = JsonConvert.SerializeObject(fileConfiguration, Formatting.Indented); |
|
||||
File.WriteAllText("ocelot.json", contents); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,116 +0,0 @@ |
|||||
using Microsoft.AspNetCore.Hosting; |
|
||||
using Newtonsoft.Json; |
|
||||
using Newtonsoft.Json.Linq; |
|
||||
using Nito.AsyncEx; |
|
||||
using Ocelot.Configuration.ChangeTracking; |
|
||||
using Ocelot.Configuration.File; |
|
||||
using Ocelot.Configuration.Repository; |
|
||||
using Ocelot.Responses; |
|
||||
using System.IO; |
|
||||
using System.Threading.Tasks; |
|
||||
using Volo.Abp.IO; |
|
||||
|
|
||||
namespace LINGYUN.MicroService.Internal.ApiGateway.Ocelot.Configuration.Repository |
|
||||
{ |
|
||||
public class DiskFileConfigurationAggragatorRepository : IFileConfigurationRepository |
|
||||
{ |
|
||||
private readonly IWebHostEnvironment _hostEnvironment; |
|
||||
private readonly IOcelotConfigurationChangeTokenSource _changeTokenSource; |
|
||||
|
|
||||
private readonly string[] _ocelotFiles; |
|
||||
|
|
||||
private static readonly AsyncLock _lock = new AsyncLock(); |
|
||||
|
|
||||
private readonly string _ocelotFilePath; |
|
||||
private readonly string _environmentFilePath; |
|
||||
|
|
||||
public DiskFileConfigurationAggragatorRepository( |
|
||||
IWebHostEnvironment hostingEnvironment, |
|
||||
IOcelotConfigurationChangeTokenSource changeTokenSource) |
|
||||
{ |
|
||||
_changeTokenSource = changeTokenSource; |
|
||||
_hostEnvironment = hostingEnvironment; |
|
||||
|
|
||||
_ocelotFilePath = Path.Combine(_hostEnvironment.ContentRootPath, "ocelot.json"); |
|
||||
_environmentFilePath = Path.Combine( |
|
||||
_hostEnvironment.ContentRootPath, |
|
||||
$"ocelot.{hostingEnvironment.EnvironmentName ?? "Development"}.json"); |
|
||||
_ocelotFiles = new string[9] |
|
||||
{ |
|
||||
"ocelot.global.json", |
|
||||
"ocelot.backendadmin.json", |
|
||||
"ocelot.idsadmin.json", |
|
||||
"ocelot.localization.json", |
|
||||
"ocelot.messages.json", |
|
||||
"ocelot.platform.json", |
|
||||
"ocelot.aggregate.json", |
|
||||
"ocelot.task.json", |
|
||||
"ocelot.webhook.json" |
|
||||
}; |
|
||||
} |
|
||||
|
|
||||
public async Task<Response<FileConfiguration>> Get() |
|
||||
{ |
|
||||
JObject configObject = null; |
|
||||
JsonMergeSettings mergeSetting = new() |
|
||||
{ |
|
||||
MergeArrayHandling = MergeArrayHandling.Union, |
|
||||
PropertyNameComparison = System.StringComparison.CurrentCultureIgnoreCase |
|
||||
}; |
|
||||
using (await _lock.LockAsync()) |
|
||||
{ |
|
||||
if (File.Exists(_environmentFilePath)) |
|
||||
{ |
|
||||
var configValue = await FileHelper.ReadAllTextAsync(_environmentFilePath); |
|
||||
configObject = JObject.Parse(configValue); |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
foreach (var ocelotFile in _ocelotFiles) |
|
||||
{ |
|
||||
var configValue = await FileHelper.ReadAllTextAsync( |
|
||||
Path.Combine(_hostEnvironment.ContentRootPath, ocelotFile)); |
|
||||
|
|
||||
if (configObject == null) |
|
||||
{ |
|
||||
configObject = JObject.Parse(configValue); |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
configObject.Merge(JObject.Parse(configValue), mergeSetting); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
await File.WriteAllTextAsync(_environmentFilePath, configObject.ToString(), encoding: System.Text.Encoding.UTF8); |
|
||||
} |
|
||||
|
|
||||
var aggregatorConfig = configObject.ToObject<FileConfiguration>(); |
|
||||
|
|
||||
return new OkResponse<FileConfiguration>(aggregatorConfig); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
public Task<Response> Set(FileConfiguration fileConfiguration) |
|
||||
{ |
|
||||
string contents = JsonConvert.SerializeObject(fileConfiguration, Formatting.Indented); |
|
||||
lock (_lock) |
|
||||
{ |
|
||||
if (System.IO.File.Exists(_environmentFilePath)) |
|
||||
{ |
|
||||
System.IO.File.Delete(_environmentFilePath); |
|
||||
} |
|
||||
|
|
||||
System.IO.File.WriteAllText(_environmentFilePath, contents); |
|
||||
if (System.IO.File.Exists(_ocelotFilePath)) |
|
||||
{ |
|
||||
System.IO.File.Delete(_ocelotFilePath); |
|
||||
} |
|
||||
|
|
||||
System.IO.File.WriteAllText(_ocelotFilePath, contents); |
|
||||
} |
|
||||
|
|
||||
_changeTokenSource.Activate(); |
|
||||
return Task.FromResult((Response)new OkResponse()); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,62 +0,0 @@ |
|||||
{ |
|
||||
"Aggregates": [ |
|
||||
{ |
|
||||
"RouteKeys": [ |
|
||||
"platform-api-definition", |
|
||||
"backend-admin-api-definition", |
|
||||
"messages-api-definition", |
|
||||
"ids-admin-api-definition", |
|
||||
"localization-api-definition", |
|
||||
"task-api-definition", |
|
||||
"webhook-api-definition" |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/abp/api-definition", |
|
||||
"Aggregator": "AbpResponseMergeAggregator" |
|
||||
}, |
|
||||
{ |
|
||||
"RouteKeys": [ |
|
||||
"platform-configuration", |
|
||||
"backend-admin-configuration", |
|
||||
"messages-configuration", |
|
||||
"ids-admin-configuration", |
|
||||
"localization-configuration", |
|
||||
"task-configuration" |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/abp/application-configuration", |
|
||||
"Aggregator": "AbpResponseMergeAggregator", |
|
||||
"Priority": 99 |
|
||||
}, |
|
||||
{ |
|
||||
"RouteKeys": [ |
|
||||
"setting-global", |
|
||||
"wechat-setting-global", |
|
||||
"tencent-cloud-setting-global", |
|
||||
"aliyun-setting-global", |
|
||||
"oss-management-setting-global" |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/setting-management/settings/by-global", |
|
||||
"Aggregator": "AbpResponseMergeAggregator", |
|
||||
"Priority": 99 |
|
||||
}, |
|
||||
{ |
|
||||
"RouteKeys": [ |
|
||||
"setting-current-tenant", |
|
||||
"wechat-setting-current-tenant", |
|
||||
"tencent-cloud-setting-current-tenant", |
|
||||
"aliyun-setting-current-tenant", |
|
||||
"oss-management-setting-current-tenant" |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/setting-management/settings/by-current-tenant", |
|
||||
"Aggregator": "AbpResponseMergeAggregator", |
|
||||
"Priority": 99 |
|
||||
}, |
|
||||
{ |
|
||||
"RouteKeys": [ |
|
||||
"setting-current-user" |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/setting-management/settings/by-current-user", |
|
||||
"Aggregator": "AbpResponseMergeAggregator", |
|
||||
"Priority": 99 |
|
||||
} |
|
||||
] |
|
||||
} |
|
||||
@ -1,809 +0,0 @@ |
|||||
{ |
|
||||
"Routes": [ |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/abp/application-configuration", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30010 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/abp/backend-admin/application-configuration", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": {}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
}, |
|
||||
"Key": "backend-admin-configuration" |
|
||||
}, |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/abp/api-definition", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30010 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/abp/backend-admin/api-definition", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": {}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
}, |
|
||||
"Key": "backend-admin-api-definition" |
|
||||
}, |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/abp/multi-tenancy/{everything}", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30010 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/abp/multi-tenancy/{everything}", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": {}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/tenant-management/{everything}", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30010 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/tenant-management/{everything}", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET", |
|
||||
"POST", |
|
||||
"PUT", |
|
||||
"DELETE" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 100 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/permission-management/{everything}", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30010 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/permission-management/{everything}", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET", |
|
||||
"POST", |
|
||||
"PUT", |
|
||||
"DELETE" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 100 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/setting-management/settings/by-current-tenant", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30010 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/setting-management/settings/by-current-tenant/app", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 100 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
}, |
|
||||
"Key": "setting-current-tenant" |
|
||||
}, |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/setting-management/settings/by-current-user", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30010 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/setting-management/settings/by-current-user/app", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 100 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
}, |
|
||||
"Key": "setting-current-user" |
|
||||
}, |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/setting-management/settings/by-global", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30010 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/setting-management/settings/by-global/app", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 100 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
}, |
|
||||
"Key": "setting-global" |
|
||||
}, |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/setting-management/wechat/by-current-tenant", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30010 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/setting-management/wechat/by-current-tenant", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 100 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
}, |
|
||||
"Key": "wechat-setting-current-tenant" |
|
||||
}, |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/setting-management/wechat/by-global", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30010 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/setting-management/wechat/by-global", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 100 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
}, |
|
||||
"Key": "wechat-setting-global" |
|
||||
}, |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/setting-management/tencent-cloud/by-current-tenant", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30010 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/setting-management/tencent-cloud/by-current-tenant", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 100 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
}, |
|
||||
"Key": "tencent-cloud-setting-current-tenant" |
|
||||
}, |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/setting-management/tencent-cloud/by-global", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30010 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/setting-management/tencent-cloud/by-global", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 100 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
}, |
|
||||
"Key": "tencent-cloud-setting-global" |
|
||||
}, |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/setting-management/aliyun/by-current-tenant", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30010 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/setting-management/aliyun/by-current-tenant", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 100 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
}, |
|
||||
"Key": "aliyun-setting-current-tenant" |
|
||||
}, |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/setting-management/aliyun/by-global", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30010 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/setting-management/aliyun/by-global", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 100 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
}, |
|
||||
"Key": "aliyun-setting-global" |
|
||||
}, |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/setting-management/settings/change-global", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30010 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/setting-management/settings/change-global", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"PUT" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 100 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/setting-management/settings/change-current-tenant", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30010 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/setting-management/settings/change-current-tenant", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"PUT" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 100 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/setting-management/settings/change-current-user", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30010 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/setting-management/settings/change-current-user", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"PUT" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 100 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/setting-management/{everything}", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30010 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/setting-management/{everything}", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET", |
|
||||
"POST", |
|
||||
"PUT", |
|
||||
"DELETE" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 5 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/feature-management/{everything}", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30010 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/feature-management/{everything}", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET", |
|
||||
"POST", |
|
||||
"PUT", |
|
||||
"DELETE" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 100 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/saas/{everything}", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30010 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/saas/{everything}", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET", |
|
||||
"POST", |
|
||||
"PUT", |
|
||||
"DELETE" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 100 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/auditing/{everything}", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30010 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/auditing/{everything}", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET", |
|
||||
"POST", |
|
||||
"PUT", |
|
||||
"DELETE" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 100 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/text-templating/{everything}", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30010 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/text-templating/{everything}", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET", |
|
||||
"POST", |
|
||||
"PUT", |
|
||||
"DELETE" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": {}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 30000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/caching-management/{everything}", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30010 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/caching-management/{everything}", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET", |
|
||||
"POST", |
|
||||
"PUT", |
|
||||
"DELETE" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": {}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 30000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/abp/localization/{everything}", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30010 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/abp/localization/{everything}", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 100 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/swagger/v1/swagger.json", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30010 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/admin/v1/swagger.json", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 100 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
} |
|
||||
} |
|
||||
] |
|
||||
} |
|
||||
@ -1,24 +0,0 @@ |
|||||
{ |
|
||||
"GlobalConfiguration": { |
|
||||
"BaseUrl": "http://localhost:30000", |
|
||||
"DownstreamScheme": "HTTP", |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"DisableRateLimitHeaders": false, |
|
||||
"ClientIdHeader": "ClientId", |
|
||||
"RateLimitCounterPrefix": "ocelot", |
|
||||
"QuotaExceededMessage": "您的操作过快,请稍后再试!", |
|
||||
"HttpStatusCode": 429 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"TimeoutValue": 30000, |
|
||||
"DurationOfBreak": 60000, |
|
||||
"ExceptionsAllowedBeforeBreaking": 30 |
|
||||
}, |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,255 +0,0 @@ |
|||||
{ |
|
||||
"Routes": [ |
|
||||
// 框架端点 |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/abp/application-configuration", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30015 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/abp/ids-admin/application-configuration", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": {}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
}, |
|
||||
"Key": "ids-admin-configuration" |
|
||||
}, |
|
||||
// 框架动态API端点 |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/abp/api-definition", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30015 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/abp/ids-admin/api-definition", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": {}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
}, |
|
||||
"Key": "ids-admin-api-definition" |
|
||||
}, |
|
||||
// 身份标识管理 |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/identity/{everything}", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30015 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/identity/{everything}", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET", |
|
||||
"POST", |
|
||||
"PUT", |
|
||||
"DELETE" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 100 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
} |
|
||||
}, |
|
||||
// 身份认证服务器管理 |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/identity-server/{everything}", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30015 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/identity-server/{everything}", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET", |
|
||||
"POST", |
|
||||
"PUT", |
|
||||
"DELETE" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 100 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
} |
|
||||
}, |
|
||||
// 用户账户管理 |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/account/{everything}", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30015 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/account/{everything}", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET", |
|
||||
"POST", |
|
||||
"PUT", |
|
||||
"DELETE" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 100 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
} |
|
||||
}, |
|
||||
// 外部认证 |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/.well-known/openid-configuration", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 44385 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/.well-known/openid-configuration", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": {}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/connect/{everything}", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 44385 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/connect/{everything}", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET", |
|
||||
"POST" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": {}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
} |
|
||||
}, |
|
||||
// API 文档 |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/swagger/v1/swagger.json", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30015 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/ids-admin/v1/swagger.json", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 100 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
} |
|
||||
} |
|
||||
] |
|
||||
} |
|
||||
@ -1,129 +0,0 @@ |
|||||
{ |
|
||||
"Routes": [ |
|
||||
// 框架端点 |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/abp/application-configuration", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30030 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/abp/localization/application-configuration", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": {}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
}, |
|
||||
"Key": "localization-configuration" |
|
||||
}, |
|
||||
// 框架动态API端点 |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/abp/api-definition", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30030 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/abp/localization/api-definition", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": {}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
}, |
|
||||
"Key": "localization-api-definition" |
|
||||
}, |
|
||||
// 本地化管理 |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/localization/{everything}", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30030 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/localization/{everything}", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET", |
|
||||
"POST", |
|
||||
"PUT", |
|
||||
"DELETE" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 100 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
} |
|
||||
}, |
|
||||
// API 文档 |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/swagger/v1/swagger.json", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30030 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/localization/v1/swagger.json", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 100 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
} |
|
||||
} |
|
||||
] |
|
||||
} |
|
||||
@ -1,291 +0,0 @@ |
|||||
{ |
|
||||
"Routes": [ |
|
||||
// 框架端点 |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/abp/application-configuration", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30020 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/abp/messages/application-configuration", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": {}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
}, |
|
||||
"Key": "messages-configuration" |
|
||||
}, |
|
||||
// 框架动态API端点 |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/abp/api-definition", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30020 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/abp/messages/api-definition", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": {}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
}, |
|
||||
"Key": "messages-api-definition" |
|
||||
}, |
|
||||
// 即时通讯 |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/im/{everything}", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30020 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/im/{everything}", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET", |
|
||||
"POST", |
|
||||
"PUT", |
|
||||
"DELETE" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 100 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
} |
|
||||
}, |
|
||||
// Hangfire定时任务 |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/hangfire/{everything}", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30020 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/hangfire/{everything}", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 100 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
} |
|
||||
}, |
|
||||
// 消息通知 |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/notifications/{everything}", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30020 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/notifications/{everything}", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET", |
|
||||
"POST", |
|
||||
"PUT", |
|
||||
"DELETE" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 100 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
} |
|
||||
}, |
|
||||
// Api文档 |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/swagger/v1/swagger.json", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30020 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/messages/v1/swagger.json", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 100 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
} |
|
||||
}, |
|
||||
// signalr实时通知 |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/signalr-hubs/messages", |
|
||||
"DownstreamScheme": "ws", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30020 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/signalr-hubs/messages", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET", |
|
||||
"POST", |
|
||||
"PUT", |
|
||||
"DELETE", |
|
||||
"OPTIONS" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": {}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": {}, |
|
||||
"DangerousAcceptAnyServerCertificateValidator": true, |
|
||||
"RouteIsCaseSensitive": false, |
|
||||
"Priority": 99 |
|
||||
}, |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/signalr-hubs/notifications", |
|
||||
"DownstreamScheme": "ws", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30020 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/signalr-hubs/notifications", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET", |
|
||||
"POST", |
|
||||
"PUT", |
|
||||
"DELETE", |
|
||||
"OPTIONS" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": {}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": {}, |
|
||||
"DangerousAcceptAnyServerCertificateValidator": true, |
|
||||
"RouteIsCaseSensitive": false, |
|
||||
"Priority": 99 |
|
||||
}, |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/signalr-hubs/{everything}", |
|
||||
"DownstreamScheme": "ws", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30020 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/signalr-hubs/{everything}", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET", |
|
||||
"POST", |
|
||||
"PUT", |
|
||||
"DELETE", |
|
||||
"OPTIONS" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": {}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": {}, |
|
||||
"DangerousAcceptAnyServerCertificateValidator": true, |
|
||||
"RouteIsCaseSensitive": false |
|
||||
} |
|
||||
] |
|
||||
} |
|
||||
@ -1,303 +0,0 @@ |
|||||
{ |
|
||||
"Routes": [ |
|
||||
// 框架端点 |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/abp/application-configuration", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30025 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/abp/platform/application-configuration", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": {}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
}, |
|
||||
"Key": "platform-configuration" |
|
||||
}, |
|
||||
// 框架动态API端点 |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/abp/api-definition", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30025 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/abp/platform/api-definition", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": {}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
}, |
|
||||
"Key": "platform-api-definition" |
|
||||
}, |
|
||||
// oss存储 |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/oss-management/{everything}", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30025 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/oss-management/{everything}", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET", |
|
||||
"POST", |
|
||||
"PUT", |
|
||||
"DELETE" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 100 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
} |
|
||||
}, |
|
||||
// 平台管理 |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/platform/{everything}", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30025 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/platform/{everything}", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET", |
|
||||
"POST", |
|
||||
"PUT", |
|
||||
"DELETE" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 100 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
} |
|
||||
}, |
|
||||
// 文件管理 |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/files/{everything}", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30025 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/files/{everything}", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET", |
|
||||
"POST", |
|
||||
"PUT", |
|
||||
"DELETE" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 100 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/files/{everything}", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30025 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/api/files/{everything}", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET", |
|
||||
"POST", |
|
||||
"PUT", |
|
||||
"DELETE" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 100 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
} |
|
||||
}, |
|
||||
// oss管理 |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/setting-management/oss-management/by-current-tenant", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30025 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/setting-management/oss-management/by-current-tenant", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 100 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
}, |
|
||||
"Key": "oss-management-setting-current-tenant" |
|
||||
}, |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/setting-management/oss-management/by-global", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30025 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/setting-management/oss-management/by-global", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 100 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
}, |
|
||||
"Key": "oss-management-setting-global" |
|
||||
}, |
|
||||
// Api文档 |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/swagger/v1/swagger.json", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30025 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/platform/v1/swagger.json", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 100 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
} |
|
||||
} |
|
||||
] |
|
||||
} |
|
||||
@ -1,96 +0,0 @@ |
|||||
{ |
|
||||
"Routes": [ |
|
||||
// 框架端点 |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/abp/application-configuration", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30040 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/abp/task/application-configuration", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": {}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
}, |
|
||||
"Key": "task-configuration" |
|
||||
}, |
|
||||
// 框架动态API端点 |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/abp/api-definition", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30040 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/abp/task/api-definition", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": {}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
}, |
|
||||
"Key": "task-api-definition" |
|
||||
}, |
|
||||
// 任务管理 |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/task-management/{everything}", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30040 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/task-management/{everything}", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET", |
|
||||
"POST", |
|
||||
"PUT", |
|
||||
"DELETE" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": { |
|
||||
"ClientWhitelist": [], |
|
||||
"EnableRateLimiting": true, |
|
||||
"Period": "1s", |
|
||||
"PeriodTimespan": 1, |
|
||||
"Limit": 100 |
|
||||
}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
} |
|
||||
} |
|
||||
] |
|
||||
} |
|
||||
@ -1,62 +0,0 @@ |
|||||
{ |
|
||||
"Routes": [ |
|
||||
// 框架动态API端点 |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/abp/api-definition", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30045 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/abp/webhook/api-definition", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": {}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 10000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
}, |
|
||||
"Key": "webhook-api-definition" |
|
||||
}, |
|
||||
// webhooks |
|
||||
{ |
|
||||
"DownstreamPathTemplate": "/api/webhooks/{everything}", |
|
||||
"DownstreamScheme": "http", |
|
||||
"DownstreamHostAndPorts": [ |
|
||||
{ |
|
||||
"Host": "127.0.0.1", |
|
||||
"Port": 30045 |
|
||||
} |
|
||||
], |
|
||||
"UpstreamPathTemplate": "/api/webhooks/{everything}", |
|
||||
"UpstreamHttpMethod": [ |
|
||||
"GET", |
|
||||
"POST", |
|
||||
"PUT", |
|
||||
"DELETE" |
|
||||
], |
|
||||
"LoadBalancerOptions": { |
|
||||
"Type": "RoundRobin" |
|
||||
}, |
|
||||
"RateLimitOptions": {}, |
|
||||
"QoSOptions": { |
|
||||
"ExceptionsAllowedBeforeBreaking": 10, |
|
||||
"DurationOfBreak": 1000, |
|
||||
"TimeoutValue": 30000 |
|
||||
}, |
|
||||
"HttpHandlerOptions": { |
|
||||
"UseTracing": true |
|
||||
} |
|
||||
} |
|
||||
] |
|
||||
} |
|
||||
Loading…
Reference in new issue