limited-tailor-29332
08/25/2025, 8:24 AMtall-airline-16756
08/25/2025, 8:24 AMtall-airline-16756
08/25/2025, 8:26 AMopenssl s_client -connect yourdomain:443.
• What exact error messages or strange behavior are you seeing in Firefox? If you could peek at the browser’s developer console, LiveKit server logs, and Caddy logs, any details there would be super helpful.
• Which version of Firefox are you using?
• And just to compare, do other browsers like Chrome or Safari work fine with your current setup? Sources: release/adapter_no_global.js | CHANGELOG.md | CHANGELOG.md | Deploy to a VM | LiveKit Docs | Deploy to a VM | LiveKit Docslimited-tailor-29332
08/25/2025, 8:31 AMmzadmin@mz-edosije-livekit1-t:/opt/livekit$ cat caddy.yaml
logging:
logs:
default:
level: INFO
storage:
module: file_system
root: /data
apps:
tls:
certificates:
load_files:
- certificate: /opt/livekit/certs/restofthedomain-fullchain.pem
key: /opt/livekit/certs/restofthedomain.key
layer4:
servers:
main:
listen: [":443"]
routes:
- match:
- tls:
sni:
- "video1-turn.restofthedomain"
handle:
- handler: tls
- handler: proxy
upstreams:
- dial: ["10.36.16.243:5349"]
- match:
- tls:
sni:
- "livekit1-stage.restofthedomain"
handle:
- handler: tls
connection_policies:
- alpn: ["http/1.1"]
- handler: proxy
upstreams:
- dial: ["localhost:7880"]
Here is the caddy configuration file
My custom certificates are valid for all the domains I need, I ran the openssl command, works for all the domains
In the image you can see the errors im getting, there are no logs in livekit server or application logs
All of the other browsers work perfetcly, chrome safari etc..tall-airline-16756
08/25/2025, 8:36 AMAccess-Control-Allow-Origin with specific origins (try to avoid wildcards if you’re using credentials) and Access-Control-Allow-Credentials: true if that applies.
• Validate WebRTC Adapter: Take a look to confirm the LiveKit WebRTC adapter is loading properly in Firefox. It’s worth checking the browser console for any JavaScript errors that might be stopping it from initializing correctly.
• SSL Certificate Validation: If you can, try testing with certificates from a trusted CA (like Let’s Encrypt) just to rule out any certificate-related issues. Firefox tends to be a bit stricter with security for WebRTC connections.
• Cross-Origin Headers: You might want to add headers like Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy: credentialless to your Caddy config to better align with WebRTC requirements.
Also, could you let me know if Firefox is showing any certificate warnings or security errors? And if the WebRTC connection state (like room.engine.connectedServerAddr) gives any hints? I’m here to help if you want to dig deeper!
Sources: JavaScript & React Components | livekit/livekit_composite | DeepWiki | test/singlenode_test.go | Deploying LiveKit | LiveKit Docs | Deploy to a VM | LiveKit Docs | release/adapter_no_global.jslimited-tailor-29332
08/25/2025, 8:37 AMtall-airline-16756
08/25/2025, 8:39 AMheader directive.
• Custom Middleware: If you really need to stick with layer 4, think about adding a middleware or proxy layer that can peek into and modify HTTP headers before the traffic hits Caddy.
Could you share a bit more about the kind of traffic you’re proxying with Caddy’s layer 4 and what your CORS needs look like? That way, I can help find the best fit for your setup.
Sources: pkg/whip/server.go | tools/server/server.cpp | Deploy to a VM | LiveKit Docs