Repository navigation
Conversation
createSiteResource and updateSiteResource already passed a "*" subdomain through validateAndConstructDomain, but without the checks public resources get. Wildcards are now limited to http mode, gated behind the wildcardSubdomain tier, and checked for conflicts with inference site resources by checkSiteResourceWildcardDomainConflict.
Share the wildcard full-domain format check between the public and private resource schemas and only allow wildcards on http private resources. Applying a blueprint now runs the same tier and conflict checks as the API, and rejects wildcards on CNAME and provided domains like public resources do.
The Traefik cert placeholder routes used Host(), which only matches the literal "*.…" name. Use a HostRegexp rule for wildcard domains and request a wildcard cert, since Traefik can't derive one from the rule.
Changing only the scheme (http/https to the backend) was saved but never sent to newt, so it kept using the old scheme until it reconnected.
S-NoF3aR
requested review from
miloschwartz and
oschwartz10612
as code owners
November 10, 2026 16:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Community Contribution License Agreement
By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.
AI Disclosure
The code was drafted with Claude Code (Anthropic) and reviewed by me. It builds
and was tested by me with an Enterprise/Postgresql test instance.
Description
Public HTTP resources support wildcard subdomains (
*.example.com), but private HTTPresources don't. The pieces underneath already support it (domain validation, Traefik's
HostRegexprules, wildcard cert lookup, olm's wildcard DNS matching, newt's HTTP proxy).It just wasn't wired up for site resources. This PR adds that.
Wildcard private HTTP resources
createSiteResource/updateSiteResourceaccept a*subdomain, under these rules:tierMatrix.wildcardSubdomainlike public resources (403)site resource only conflicts with inference site resources, because HTTP site resources
are resolved by the client's own DNS. The new helper for this is
checkSiteResourceWildcardDomainConflictindomainUtils.ts.PrivateResourceSchemaaccepts a wildcardfull-domainwith the same formatrule as public resources, but only in
mode: http. The apply step also runs the tier andconflict checks, and rejects CNAME and namespace domains for wildcards.
HostRegexpfor wildcarddomains, and their TLS config sets
preferWildcardCert. Traefik can't work out which certto use from a
HostRegexprule, so it needs the domain spelled out.HTTP mode.
Separate fix (found while testing): scheme changes weren't sent to newt
handleMessagingForUpdatedSiteResourcechecks which fields changed before it sends updatedtargets to newt.
schemewasn't one of the fields it checked. Switching a private HTTPresource between
httpandhttps(the connection to the backend) saved to the database,but newt kept using the old scheme until it reconnected. You'd get errors like nginx's
"plain HTTP request was sent to HTTPS port". I added
schemeChangednext tosslChanged.How to test?
prefer_wildcard_cert: trueand the cert fromacme_json_path.*on that domain, pointing to abackend that serves the front hostnames. Turn on Enable TLS.
Scheme fix: switch the resource's scheme between http and https and save. newt
should use the new scheme right away, without disabling the resource or restarting newt.