fix(portal): drop GC_CADDY_EMAIL preflight — ACME issues portal cert without an account email - #181
Merged
Merged
Conversation
…without an account email The public-host save was rejected with a 400 unless GC_CADDY_EMAIL was set, on the assumption that Caddy silently fails issuance without it. That is wrong: Let's Encrypt does not require an account email, and in production GC_CADDY_EMAIL is empty yet every public route domain gets a valid cert via Caddy's default ACME automation (apps.tls is null). The portal host gets its cert the same way. Remove the false guard + dead i18n key; tests now run with caddy.email='' and assert a verified public domain is accepted.
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.
Problem
Beim Umstellen der Portal-Domain auf eine verifizierte öffentliche Domain wurde der Save mit 400 abgelehnt:
Ursache
Der Preflight in
src/routes/api/settings/portal.js(if (base && !config.caddy.email) → 400) beruhte auf der falschen Annahme, Caddy stelle ohne Account-Email kein Zertifikat aus.Das stimmt nicht: Let's Encrypt verlangt keine Account-Email. In Produktion ist
GC_CADDY_EMAILleer,apps.tlsin der laufenden Caddy-Config istnull(buildTlsAutomationgibt bei leerer Emailnullzurück) — und trotzdem bekommen alle ~15 öffentlichen Route-Domains (nas/jellyfin/pihole.domaincaster.com …) gültige Zertifikate über Caddys Default-ACME-Automation. Der Portal-Host bekommt sein Cert über genau denselben Mechanismus.Der Preflight war also ein Fehlalarm, der das Feature grundlos blockierte.
Fix
settings.portal.host_requires_caddy_emailaus beiden Locales entfernt.tests/portal_settings_host.test.jsläuft jetzt mitconfig.caddy.email === ''+ neuer expliziter Regressionstest: „verifizierte öffentliche Domain wird OHNE GC_CADDY_EMAIL akzeptiert".GC_CADDY_EMAILbleibt optional (nur für LE-Ablauf-Benachrichtigungen, die Caddys Auto-Renew ohnehin überflüssig machen).Tests
Volle Portal-Suite 60/60 grün lokal (inkl. neuem Regressionstest + i18n-Parität).
🤖 Generated with Claude Code