Fix notification URLs in HTTP deployments

Fixes #19 by making the December server advertise notification and service URLs with the configured deployment scheme.
This commit is contained in:
Alexa
2026-06-22 12:09:01 +03:00
committed by GitHub
parent 9fd2067f32
commit 1a07182555
7 changed files with 35 additions and 12 deletions
@@ -106,7 +106,8 @@ public static class ServiceCollectionExtensions
builder.Configuration["Domain:Apex"]
?? Environment.GetEnvironmentVariable("DORKNET_DOMAIN")
?? "localhost";
builder.Services.AddSingleton(new DomainConfig(apex));
var scheme = builder.Configuration["Domain:Scheme"] ?? "https";
builder.Services.AddSingleton(new DomainConfig(apex, scheme));
builder.Services.Configure<Microsoft.AspNetCore.HostFiltering.HostFilteringOptions>(opt =>
{
opt.AllowedHosts = new[] { apex, $"*.{apex}", "localhost", "127.0.0.1" };