|
@@ -2,12 +2,13 @@ |
|
|
// Licensed under the MIT License. See License.txt in the project root for license information. |
|
|
// Licensed under the MIT License. See License.txt in the project root for license information. |
|
|
|
|
|
|
|
|
using System; |
|
|
using System; |
|
|
using System.Linq; |
|
|
|
|
|
|
|
|
using System.Globalization; |
|
|
using System.Net; |
|
|
using System.Net; |
|
|
using System.Threading.Tasks; |
|
|
using System.Threading.Tasks; |
|
|
using DotNetCore.CAP.Dashboard; |
|
|
using DotNetCore.CAP.Dashboard; |
|
|
using DotNetCore.CAP.Dashboard.GatewayProxy; |
|
|
using DotNetCore.CAP.Dashboard.GatewayProxy; |
|
|
using DotNetCore.CAP.Dashboard.NodeDiscovery; |
|
|
using DotNetCore.CAP.Dashboard.NodeDiscovery; |
|
|
|
|
|
using DotNetCore.CAP.Dashboard.Resources; |
|
|
using DotNetCore.CAP.Persistence; |
|
|
using DotNetCore.CAP.Persistence; |
|
|
using Microsoft.AspNetCore.Builder; |
|
|
using Microsoft.AspNetCore.Builder; |
|
|
using Microsoft.AspNetCore.Hosting; |
|
|
using Microsoft.AspNetCore.Hosting; |
|
@@ -36,7 +37,6 @@ namespace DotNetCore.CAP |
|
|
{ |
|
|
{ |
|
|
app.UseMiddleware<GatewayProxyMiddleware>(); |
|
|
app.UseMiddleware<GatewayProxyMiddleware>(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
app.UseMiddleware<DashboardMiddleware>(); |
|
|
app.UseMiddleware<DashboardMiddleware>(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@@ -77,7 +77,7 @@ namespace DotNetCore.CAP |
|
|
app.UseCapDashboard(); |
|
|
app.UseCapDashboard(); |
|
|
|
|
|
|
|
|
next(app); |
|
|
next(app); |
|
|
}; |
|
|
|
|
|
|
|
|
}; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@@ -106,6 +106,9 @@ namespace DotNetCore.CAP |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var userLanguages = context.Request.Headers["Accept-Language"].ToString(); |
|
|
|
|
|
Strings.Culture = userLanguages.Contains("zh-") ? new CultureInfo("zh-CN") : new CultureInfo("en-US"); |
|
|
|
|
|
|
|
|
// Update the path |
|
|
// Update the path |
|
|
var path = context.Request.Path; |
|
|
var path = context.Request.Path; |
|
|
var pathBase = context.Request.PathBase; |
|
|
var pathBase = context.Request.PathBase; |
|
|