Commit 4ba71d5a authored by liudong1993's avatar liudong1993

1

parent 1f63d8bb
...@@ -9,6 +9,7 @@ using Microsoft.Extensions.DependencyInjection; ...@@ -9,6 +9,7 @@ using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using VTX.FW.Config; using VTX.FW.Config;
using VTX.FW.Filter; using VTX.FW.Filter;
using VTX.FW.Helper; using VTX.FW.Helper;
...@@ -63,11 +64,21 @@ namespace EduSpider.WebApi ...@@ -63,11 +64,21 @@ namespace EduSpider.WebApi
{ {
"http://localhost:7100", "http://localhost:7100",
"http://localhost:7200", "http://localhost:7200",
"http://localhost:8181",
"https://edu.kookaku.com",
}; };
var ArrayStr = ConfigHelper.GetAppsettings("corsArray"); var ArrayStr = ConfigHelper.GetAppsettings("corsArray");
if (!string.IsNullOrWhiteSpace(ArrayStr)) if (!string.IsNullOrWhiteSpace(ArrayStr))
{ {
corsArray.AddRange(JsonHelper.Deserialize<List<string>>(ArrayStr)); var accesslist = ArrayStr.Split(',');
foreach (var item in accesslist)
{
if (!string.IsNullOrEmpty(item))
{
corsArray.Add(item);
}
}
corsArray = corsArray.Distinct().ToList();
} }
return corsArray; return corsArray;
} }
......
...@@ -8,19 +8,7 @@ ...@@ -8,19 +8,7 @@
}, },
"AllowedHosts": "*", "AllowedHosts": "*",
// //
"corsArray": [ "corsArray": "https://edu.kookaku.com",
"http://localhost",
"http://localhost:7100",
"http://192.168.10.214:7100",
"http://localhost:7200",
"http://192.168.10.214:7200",
"http://localhost:8081",
"http://localhost:8080",
"http://localhost:8181",
"http://localhost:8182",
"http://localhost:8082",
"http://localhost:7302"
],
//ַ //ַ
"ConnectionStrings": { "ConnectionStrings": {
"DefaultConnection": "server=192.168.10.214;user id=reborn;password=Reborn@2018;database=reborn_think;CharSet=utf8mb4; Convert Zero Datetime=true; ", "DefaultConnection": "server=192.168.10.214;user id=reborn;password=Reborn@2018;database=reborn_think;CharSet=utf8mb4; Convert Zero Datetime=true; ",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment