From 05099cce9116e492af665c338cc2cea08f85180e Mon Sep 17 00:00:00 2001 From: Alexa <53471801+Alexa-RR@users.noreply.github.com> Date: Sat, 27 Jun 2026 23:59:06 +0300 Subject: [PATCH] Whitelist api.{apex} as a shared public host MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit api.{apex} is the client's primary API host, served by path dispatch across every service. It belonged to no route group's HostSubdomains, so it was absent from PublicSubdomains and thus from the monolith's HostFiltering AllowedHosts — every request to api.{apex} was rejected with 400 "Bad Request - Invalid Hostname". Append "api" alongside admin/feed so it is whitelisted while remaining path-routed (it owns no service by host). --- DorkNet.Contracts/DorkNetRouteOwnership.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/DorkNet.Contracts/DorkNetRouteOwnership.cs b/DorkNet.Contracts/DorkNetRouteOwnership.cs index 9242884..8e916d0 100644 --- a/DorkNet.Contracts/DorkNetRouteOwnership.cs +++ b/DorkNet.Contracts/DorkNetRouteOwnership.cs @@ -167,6 +167,11 @@ public static class DorkNetRouteOwnership public static IReadOnlyList PublicSubdomains => ServiceRouteGroups .SelectMany(group => group.HostSubdomains) + // api.* is a shared public host: it owns no service by host and is + // dispatched by path (see ResolvePublicService's path-prefix pass), + // so it never appears in a group's HostSubdomains. It must still be + // whitelisted here or HostFiltering rejects every api.{apex} request. + .Append("api") .Append(AdminHost) .Append("feed") .Distinct(StringComparer.OrdinalIgnoreCase)