fix(S2-a): expose scoped app MQTT through WSS

This commit is contained in:
Brent Perteet
2026-08-20 15:43:42 -05:00
parent b66ae2cc47
commit 9ffe021354
4 changed files with 24 additions and 5 deletions

View File

@@ -21,8 +21,16 @@ server {
client_max_body_size 20m;
location /mqtt {
# Anonymous MQTT-over-WebSocket was removed for Sprint 2 security criterion B1.
return 410;
# Authenticated, ACL-confined MQTT-over-WebSocket. Mosquitto is bound to loopback;
# nginx terminates publicly trusted TLS so phones can use standard port 443.
proxy_pass http://127.0.0.1:9001/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_read_timeout 300s;
}
location / {