Add HTTPS demo entry for microphone access

- Add a self-signed HTTPS Nginx entrypoint on Docker port 4443 so browser microphone APIs can run in demo mode.

- Keep the existing HTTP port 4002 unchanged while exposing container port 443 and generating the demo certificate during image build.

- Update CORS defaults and Compose environment for the HTTPS frontend origin.

- Clarify the report editor microphone message with localhost, HTTPS, and browser trusted-origin demo options.

- Document the browser HTTP microphone limitation, HTTPS demo URL, and Chrome/Edge insecure-origin workaround in README and docs.
This commit is contained in:
2026-05-02 03:34:31 +08:00
parent 2a86d9f5e4
commit b346b7e194
12 changed files with 81 additions and 11 deletions

View File

@@ -1123,7 +1123,7 @@ export default function ReportEditor() {
if (!mediaDevices?.getUserMedia) {
alert(window.isSecureContext
? '当前浏览器不支持麦克风采集,请更换新版 Chrome/Edge 后重试。'
: '麦克风需要在 localhost 或 HTTPS 环境下使用。请通过 localhost 访问,或配置 HTTPS 后重试。');
: '浏览器不允许在普通局域网 HTTP 页面中调用麦克风。请使用 http://localhost:4002、https://localhost:4443或用浏览器演示参数把当前 HTTP 地址标记为可信。');
return;
}
if (!AudioContextClass) {