Files
SVSimServer/SVSim.EmulatedEntrypoint/appsettings.json
gamer147 1bdcd8397b config(battle-node): require NodeServerUrl from appsettings, no fallback
Move the localhost default off BattleNodeOptions and out of Program.cs
into an appsettings.json "BattleNode" section, and make AddBattleNode
throw at startup if the value is missing or blank. Deployments now must
set the URL explicitly, and dev keeps working via the checked-in value.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-07-04 15:10:23 -04:00

40 lines
1.5 KiB
JSON

{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning",
"Microsoft.AspNetCore.HttpLogging.HttpLoggingMiddleware": "Information",
"Microsoft.EntityFrameworkCore": "Warning",
"Microsoft.EntityFrameworkCore.Database.Command": "Warning",
"Microsoft.EntityFrameworkCore.Infrastructure": "Warning"
}
},
"Serilog": {
"MinimumLevel": {
"Default": "Information",
"Override": {
"Microsoft.AspNetCore": "Warning",
"Microsoft.AspNetCore.HttpLogging.HttpLoggingMiddleware": "Information",
"Microsoft.EntityFrameworkCore": "Warning",
"Microsoft.EntityFrameworkCore.Database.Command": "Warning",
"Microsoft.EntityFrameworkCore.Infrastructure": "Warning"
}
}
},
"ConnectionStrings": {
"ApplicationDb": "Host=localhost;Database=svsim;Username=postgres;password=postgres"
},
"Deck": {
"MaxDeckSlots": 36
},
"BattleNode": {
// Socket.IO v2 endpoint URL echoed to the client on /*/do_matching success.
// Wire format: "host[:port]/socket.io/" — no scheme prefix, trailing slash REQUIRED.
// Host may be an IP, hostname, or FQDN. BestHTTP's SocketManager parses this string
// directly; a leading http:// or https:// will make the client fail to connect.
// Startup throws if this value is missing or blank; there is no hardcoded fallback.
"NodeServerUrl": "localhost:5148/socket.io/"
},
"AllowedHosts": "*"
}