feature: HTTPS is always on, for wan.local_fqdn or, without it, the host name and its mDNS name, optionally also for the server's addresses, and the redirect to HTTPS covers the status page by name.
Release / release (push) Successful in 23s

This commit is contained in:
slawek committed 2026-11-24 19:26:51 +01:00
1 parent 7efacfa3bb
commit 64c3ae4c36
18 files changed
+317 -187

No files matched your search

+6 -7
View File
@@ -17,8 +17,8 @@ import {
} from './api.ts'
/**
* The Server tab of the Certificates page, the server's HTTPS from /config and /https/settings: whether HTTPS is on and
* for which name, with a chip while the certificate has another source than ACME and a button that opens
* The Server tab of the Certificates page, the server's HTTPS from /config and /https/settings: the names and addresses
* HTTPS is served for, with a chip while the certificate has another source than ACME and a button that opens
* HttpsSettingsDialog; the certificate of a source other than ACME, and, for one of another CA, Generate CSR, Import
* certificate and Import PFX; the ACME CA with a chip while it is Let's Encrypt's staging environment and a button that
* opens AcmeSettingsDialog; and Caddy, its version and the state of caddy.service. Until the first setup
@@ -89,10 +89,9 @@ export default function ServerCertificatePanel() {
}
const https = details?.configuration.https
const fqdn = String(details?.configuration.wan?.local_fqdn ?? '')
const httpsOn = https?.enabled === true
const hosts = [...(details?.network.https_names ?? []), ...(details?.network.https_addresses ?? [])]
const chosen = certificate !== null && certificate.source !== ''
const other = httpsOn && certificate !== null && certificate.source !== 'acme'
const other = certificate !== null && certificate.source !== 'acme'
return (
<Box>
@@ -106,9 +105,9 @@ export default function ServerCertificatePanel() {
rows={[
['HTTPS', (
<Stack key="https" direction="row" sx={{ alignItems: 'center', gap: 1, flexWrap: 'wrap' }}>
<span>{httpsOn ? (fqdn ? `on, for ${fqdn}` : 'on, but wan.local_fqdn is not set') : 'off'}</span>
<span>{hosts.length > 0 ? `for ${hosts.join(', ')}` : 'on'}</span>
{other && certificate.source !== '' && <Chip size="small" label={CERTIFICATE_LABELS[certificate.source]} color={certificate.served === certificate.source ? 'default' : 'warning'} />}
{httpsOn && !chosen && <Typography variant="body2" color="text.secondary">certificate chosen by the next setup</Typography>}
{!chosen && <Typography variant="body2" color="text.secondary">certificate chosen by the next setup</Typography>}
<Tooltip title="HTTPS certificate">
<IconButton size="small" aria-label="HTTPS certificate" onClick={() => void open('https')}>
<Settings fontSize="small" />