This commit is contained in:
@@ -23,6 +23,7 @@ export function ServerTlsForm({ config, onChange }: SectionFormProps) {
|
||||
|
||||
// Navigate to the server.tls sub-object; fall back to empty object if absent.
|
||||
const tls = (config?.server?.tls) ?? {};
|
||||
const server = (config?.server) ?? {};
|
||||
|
||||
return (
|
||||
<div className="space-y-5">
|
||||
@@ -35,6 +36,21 @@ export function ServerTlsForm({ config, onChange }: SectionFormProps) {
|
||||
{t('serverTls.restartBanner')}
|
||||
</div>
|
||||
|
||||
{/* HTTP(S) listen port */}
|
||||
<div>
|
||||
<FieldLabel>{t('serverTls.port')}</FieldLabel>
|
||||
<FieldInput
|
||||
type="number"
|
||||
value={server.port != null ? String(server.port) : ''}
|
||||
onChange={v => {
|
||||
const n = parseInt(v, 10);
|
||||
onChange('server.port', isNaN(n) ? undefined : n);
|
||||
}}
|
||||
placeholder="9876"
|
||||
/>
|
||||
<HelpText>{t('serverTls.portHelp')}</HelpText>
|
||||
</div>
|
||||
|
||||
{/* Enable HTTPS */}
|
||||
<div>
|
||||
<label className="inline-flex items-center gap-2 text-[13px] text-slate-700 dark:text-slate-200">
|
||||
|
||||
@@ -782,6 +782,8 @@
|
||||
},
|
||||
"serverTls": {
|
||||
"title": "HTTPS / TLS",
|
||||
"port": "HTTP(S) port",
|
||||
"portHelp": "Port the server listens on (default 9876). The PORT environment variable (incl. .env) takes precedence over this value. Requires a restart to apply.",
|
||||
"enabled": "Serve over HTTPS",
|
||||
"enabledHelp": "Terminate TLS in the app. Self-signed by default — browsers (and the noVNC / SSH console over wss) will warn until you install a real certificate. Requires a restart to apply.",
|
||||
"certFile": "Certificate file (PEM)",
|
||||
|
||||
@@ -782,6 +782,8 @@
|
||||
},
|
||||
"serverTls": {
|
||||
"title": "HTTPS / TLS",
|
||||
"port": "HTTP(S) ポート",
|
||||
"portHelp": "サーバーが待ち受けるポート番号(デフォルト 9876)。環境変数 PORT(.env 含む)がこの値より優先されます。反映にはサーバーの再起動が必要です。",
|
||||
"enabled": "HTTPS で配信",
|
||||
"enabledHelp": "アプリ内で TLS を終端します。デフォルトは自己署名証明書のため、正式な証明書を導入するまでブラウザ(および wss 経由の noVNC・SSH コンソール)に警告が表示されます。反映にはサーバーの再起動が必要です。",
|
||||
"certFile": "証明書ファイル(PEM)",
|
||||
|
||||
Reference in New Issue
Block a user