Modify settings to directly use server without reverse proxy
This commit is contained in:
parent
20b0765598
commit
5d904c1ed7
Binary file not shown.
BIN
TaikoLocalServer/Certificates/root.pfx
Normal file
BIN
TaikoLocalServer/Certificates/root.pfx
Normal file
Binary file not shown.
@ -116,7 +116,7 @@ public static class FlagCalculator
|
||||
{
|
||||
if (id >= bitArraySize)
|
||||
{
|
||||
logger.LogWarning("Id out of range!");
|
||||
logger.LogWarning("Id {Id} out of range!", id);
|
||||
continue;
|
||||
}
|
||||
bitSet.Set((int)id, true);
|
||||
|
@ -23,11 +23,8 @@ try
|
||||
// Manually enable tls 1.0
|
||||
builder.WebHost.UseKestrel(kestrelOptions =>
|
||||
{
|
||||
kestrelOptions.ConfigureHttpsDefaults(httpsOptions =>
|
||||
{
|
||||
httpsOptions.SslProtocols =
|
||||
SslProtocols.Tls | SslProtocols.Tls11 | SslProtocols.Tls12 | SslProtocols.Tls13;
|
||||
});
|
||||
kestrelOptions.ConfigureHttpsDefaults(options =>
|
||||
options.SslProtocols = SslProtocols.Tls | SslProtocols.Tls11 | SslProtocols.Tls12 | SslProtocols.Tls13);
|
||||
});
|
||||
|
||||
builder.Host.UseSerilog((context, configuration) =>
|
||||
|
@ -47,6 +47,9 @@
|
||||
<Content Update="wwwroot\data\music_attribute.bin">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\music_attribute.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -36,8 +36,20 @@
|
||||
|
||||
"Kestrel": {
|
||||
"Endpoints": {
|
||||
"Server": {
|
||||
"BaseServer": {
|
||||
"Url": "http://0.0.0.0:5000"
|
||||
},
|
||||
"AmAuthServer": {
|
||||
"Url": "http://0.0.0.0:80"
|
||||
},
|
||||
"MuchaServer": {
|
||||
"Url": "https://0.0.0.0:10122"
|
||||
},
|
||||
"GameServer1": {
|
||||
"Url": "https://0.0.0.0:54430"
|
||||
},
|
||||
"GameServer2": {
|
||||
"Url": "https://0.0.0.0:54431"
|
||||
}
|
||||
},
|
||||
"Certificates": {
|
||||
|
@ -7,7 +7,7 @@ builder.RootComponents.Add<HeadOutlet>("head::after");
|
||||
|
||||
builder.Services.AddSingleton(sp => new HttpClient
|
||||
{
|
||||
BaseAddress = new Uri(builder.Configuration.GetValue<string>("BaseUrl"))
|
||||
BaseAddress = new Uri(builder.HostEnvironment.BaseAddress)
|
||||
});
|
||||
builder.Services.AddMudServices();
|
||||
builder.Services.AddSingleton<IGameDataService, GameDataService>();
|
||||
@ -15,10 +15,6 @@ builder.Services.AddSingleton<IGameDataService, GameDataService>();
|
||||
var host = builder.Build();
|
||||
|
||||
var gameDataService = host.Services.GetRequiredService<IGameDataService>();
|
||||
#if DEBUG
|
||||
await gameDataService.InitializeAsync(builder.Configuration.GetValue<string>("DataBaseUrl"));
|
||||
#else
|
||||
await gameDataService.InitializeAsync(builder.Configuration.GetValue<string>("BaseUrl"));
|
||||
#endif
|
||||
await gameDataService.InitializeAsync(builder.HostEnvironment.BaseAddress);
|
||||
|
||||
await host.RunAsync();
|
@ -30,6 +30,7 @@ public class GameDataService : IGameDataService
|
||||
|
||||
public async Task InitializeAsync(string dataBaseUrl)
|
||||
{
|
||||
dataBaseUrl = dataBaseUrl.TrimEnd('/');
|
||||
var musicInfo = await GetData<MusicInfo>(dataBaseUrl, Constants.MUSIC_INFO_BASE_NAME);
|
||||
var wordList = await GetData<WordList>(dataBaseUrl, Constants.WORD_LIST_BASE_NAME);
|
||||
var musicOrder = await GetData<MusicOrder>(dataBaseUrl, Constants.MUSIC_ORDER_BASE_NAME);
|
||||
|
@ -20,9 +20,6 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Update="wwwroot\appsettings.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\musicinfo.bin">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
@ -32,6 +29,18 @@
|
||||
<Content Update="wwwroot\data\wordlist.bin">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\music_attribute.bin">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\music_order.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\musicinfo.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\wordlist.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -1,3 +0,0 @@
|
||||
{
|
||||
"DataBaseUrl": "http://localhost:5000"
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
{
|
||||
"BaseUrl": "http://localhost:5000"
|
||||
}
|
Loading…
Reference in New Issue
Block a user