郑勃旭 2 years ago
parent
commit
2cb34ef31f
  1. 2
      be/.gitattributes
  2. 35
      be/Modules/Shared/src/Win_in.Sfs.Shared.Host/ModuleBase.cs
  3. 1
      build/src/docker/.gitignore
  4. 4
      build/src/docker/publish/apps/be/Web.Gateway/Web.Gateway.deps.json
  5. BIN
      build/src/docker/publish/apps/be/Web.Gateway/Web.Gateway.dll
  6. BIN
      build/src/docker/publish/apps/be/Web.Gateway/Web.Gateway.exe
  7. BIN
      build/src/docker/publish/apps/be/Web.Gateway/Web.Gateway.pdb
  8. 2
      build/src/docker/publish/apps/be/Web.Gateway/appsettings.Production.json
  9. 34
      build/src/docker/publish/apps/be/Web.Gateway/appsettings.json
  10. 6824
      build/src/docker/publish/apps/be/Web.Gateway/logs/log.txt
  11. 9
      build/src/docker/publish/conf/gateway/appsettings.json

2
be/.gitattributes

@ -1,2 +1,4 @@
* text=auto eol=lf
*.{cmd,[cC][mM][dD]} text eol=crlf
*.{bat,[bB][aA][tT]} text eol=crlf
**/wwwroot/libs/** linguist-vendored

35
be/Modules/Shared/src/Win_in.Sfs.Shared.Host/ModuleBase.cs

@ -208,7 +208,7 @@ public abstract class ModuleBase<T> : AbpModule where T : AbpModule
app.UseCorrelationId();
app.UseStaticFiles();
app.UseRouting();
app.UseCors();
app.UseCors("Default");
app.UseAuthentication();
app.UseJwtTokenMiddleware();
app.UseUnitOfWork();
@ -246,20 +246,27 @@ public abstract class ModuleBase<T> : AbpModule where T : AbpModule
Console.WriteLine($"CORS Origins:{string.Concat(origins)}");
ServiceConfigurationContext.Services.AddCors(options =>
{
options.AddDefaultPolicy(builder =>
//options.AddDefaultPolicy(builder =>
//{
// builder
// .WithOrigins(
// origins
// .Select(o => o.RemovePostFix("/"))
// .ToArray()
// )
// //.AllowAnyOrigin()//允许所有跨域
// //.WithAbpExposedHeaders()
// .SetIsOriginAllowedToAllowWildcardSubdomains()
// .AllowAnyHeader()
// .AllowAnyMethod()
// .AllowCredentials();//按配置文件中 跨域
//});
options.AddPolicy("Default", builder =>
{
builder
.WithOrigins(
origins
.Select(o => o.RemovePostFix("/"))
.ToArray()
)
//.AllowAnyOrigin()//允许所有跨域
//.WithAbpExposedHeaders()
.SetIsOriginAllowedToAllowWildcardSubdomains()
.AllowAnyHeader()
.AllowAnyMethod()
.AllowCredentials();//按配置文件中 跨域
builder.SetIsOriginAllowed(isOriginAllowed => true)
.AllowAnyMethod()
.AllowAnyHeader()
.AllowCredentials();
});
});
}

1
build/src/docker/.gitignore

@ -1,2 +1,3 @@
publish/data
publish/logs
**/logs/

4
build/src/docker/publish/apps/be/Web.Gateway/Web.Gateway.deps.json

@ -6,7 +6,7 @@
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v6.0": {
"Web.Gateway/0.1.1": {
"Web.Gateway/0.1.5": {
"dependencies": {
"Flurl": "3.0.7",
"InfluxDB.Client": "4.11.0",
@ -480,7 +480,7 @@
}
},
"libraries": {
"Web.Gateway/0.1.1": {
"Web.Gateway/0.1.5": {
"type": "project",
"serviceable": false,
"sha512": ""

BIN
build/src/docker/publish/apps/be/Web.Gateway/Web.Gateway.dll

Binary file not shown.

BIN
build/src/docker/publish/apps/be/Web.Gateway/Web.Gateway.exe

Binary file not shown.

BIN
build/src/docker/publish/apps/be/Web.Gateway/Web.Gateway.pdb

Binary file not shown.

2
build/src/docker/publish/apps/be/Web.Gateway/appsettings.Production.json

@ -0,0 +1,2 @@
{
}

34
build/src/docker/publish/apps/be/Web.Gateway/appsettings.json

@ -2,14 +2,38 @@
"ConnectionStrings": {
"InfluxDB": "url=http://influxdb:8086;database=logs;usr=admin;pwd=aA123456!;retention-policy=d30;"
},
"CORS": {
"abp": {
"AllowAnyOrigin": false,
"Origins": [
"http://localhost:9527"
]
}
},
"ReverseProxy": {
"Routes": {
"abp": {
"ClusterId": "abp",
"CorsPolicy": "abp",
"Match": {
"Path": "/api/auth/{regex((abp|identity|base|multi-tenancy|permission-management))}/{**catch-all}"
},
"Transforms": [
{
"PathRemovePrefix": "/api/auth"
}
]
},
"ids4": {
"ClusterId": "ids4",
"ClusterId": "auth",
"Match": {
"Path": "/api/connect/{**catch-all}"
"Path": "/api/auth/connect/{**catch-all}"
},
"Transforms": [ { "PathRemovePrefix": "/api" } ]
"Transforms": [
{
"PathRemovePrefix": "/api/auth"
}
]
},
"auth": {
"ClusterId": "auth",
@ -37,10 +61,10 @@
}
},
"Clusters": {
"ids4": {
"abp": {
"Destinations": {
"dest": {
"Address": "http://sfs-auth-web:59093/"
"Address": "http://sfs-auth-web:59093/api/"
}
}
},

6824
build/src/docker/publish/apps/be/Web.Gateway/logs/log.txt

File diff suppressed because it is too large

9
build/src/docker/publish/conf/gateway/appsettings.json

@ -2,10 +2,19 @@
"ConnectionStrings": {
"InfluxDB": "url=http://influxdb:8086;database=logs;usr=admin;pwd=aA123456!;retention-policy=d30;"
},
"CORS": {
"abp": {
"AllowAnyOrigin": false,
"Origins": [
"http://localhost:9527"
]
}
},
"ReverseProxy": {
"Routes": {
"abp": {
"ClusterId": "abp",
"CorsPolicy": "abp",
"Match": {
"Path": "/api/auth/{regex((abp|identity|base|multi-tenancy|permission-management))}/{**catch-all}"
},

Loading…
Cancel
Save