stabilizaiton work - projects rework for maintenanceability and ui livening
This commit is contained in:
@@ -45,3 +45,7 @@
|
||||
- NuGet: use `.nuget/packages/` cache; avoid floating versions.
|
||||
- Linting/analyzers: keep nullable enabled; treat warnings as errors where feasible.
|
||||
|
||||
## Service Endpoints
|
||||
- Development: https://localhost:10450, http://localhost:10451
|
||||
- Local alias: https://advisoryai.stella-ops.local, http://advisoryai.stella-ops.local
|
||||
- Env var: STELLAOPS_ADVISORYAI_URL
|
||||
|
||||
@@ -24,6 +24,7 @@ using StellaOps.AdvisoryAI.WebService.Contracts;
|
||||
using StellaOps.AdvisoryAI.WebService.Endpoints;
|
||||
using StellaOps.AdvisoryAI.WebService.Services;
|
||||
using StellaOps.Evidence.Pack;
|
||||
using StellaOps.Auth.ServerIntegration;
|
||||
using StellaOps.Router.AspNet;
|
||||
using System.Collections.Immutable;
|
||||
using System.Diagnostics;
|
||||
@@ -77,6 +78,8 @@ builder.Services.TryAddStellaRouter(
|
||||
version: typeof(Program).Assembly.GetName().Version?.ToString() ?? "1.0.0",
|
||||
routerOptions: routerOptions);
|
||||
|
||||
builder.Services.AddStellaOpsCors(builder.Environment, builder.Configuration);
|
||||
|
||||
builder.Services.AddRateLimiter(options =>
|
||||
{
|
||||
options.RejectionStatusCode = StatusCodes.Status429TooManyRequests;
|
||||
@@ -100,7 +103,9 @@ builder.Services.AddRateLimiter(options =>
|
||||
});
|
||||
});
|
||||
|
||||
builder.TryAddStellaOpsLocalBinding("advisoryai");
|
||||
var app = builder.Build();
|
||||
app.LogStellaOpsLocalHostname("advisoryai");
|
||||
|
||||
app.UseExceptionHandler(static options => options.Run(async context =>
|
||||
{
|
||||
@@ -113,6 +118,7 @@ if (app.Environment.IsDevelopment())
|
||||
app.MapOpenApi();
|
||||
}
|
||||
|
||||
app.UseStellaOpsCors();
|
||||
app.UseRateLimiter();
|
||||
app.TryUseStellaRouter(routerOptions);
|
||||
|
||||
|
||||
@@ -4,9 +4,11 @@
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
"ASPNETCORE_ENVIRONMENT": "Development",
|
||||
"STELLAOPS_WEBSERVICES_CORS": "true",
|
||||
"STELLAOPS_WEBSERVICES_CORS_ORIGIN": "https://stella-ops.local,https://stella-ops.local:10000,https://localhost:10000"
|
||||
},
|
||||
"applicationUrl": "https://localhost:62501;http://localhost:62502"
|
||||
"applicationUrl": "https://localhost:10450;http://localhost:10451"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user