gateway: serve HTTPS when TLS_CERT and TLS_KEY are set

Not a nicety. getDisplayMedia, getUserMedia and crypto.randomUUID are
secure-context-only, so a LAN instance reached over plain http could
neither share a screen nor use the microphone. Chrome additionally hides
host ICE candidates behind mDNS names until a media permission is
granted, which keeps a peer-to-peer stream from connecting at all - so
the publishing direction was effectively unreachable from anywhere but
localhost.

The frontend already derives ws:// or wss:// from the page's own scheme,
so nothing else needs configuring. Verified from the LAN address with a
self-signed cert: isSecureContext true, both media APIs present.

gateway/certs/ is gitignored - a private key never belongs in the repo.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
This commit is contained in:
MoepchiandClaude Opus 5 committed 2026-09-11 05:26:33 +00:00
1 parent 15e215d892
commit 7083e8e29f
2 files changed
+36 -3

No files matched your search

+3
View File
@@ -10,3 +10,6 @@ docker-compose.override.yml
.claude/
CLAUDE.md
.serena/
# TLS material for local HTTPS - a private key never belongs in the repo.
gateway/certs/