Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,15 @@ const io = new Server(httpServer, {
origin.startsWith('http://localhost:') ||
origin.startsWith('http://127.0.0.1:') ||
origin.startsWith('http://[::1]:') ||
origin.startsWith('http://100.');
origin.startsWith('http://100.') ||
// Private (RFC1918) ranges only — home/office LAN devices reaching the
// orchestrator via the Windows portproxy (phone, second PC) present
// origins like http://192.168.1.23:2080. A bare "172." prefix would
// also whitelist public internet space (e.g. Cloudflare/Google ranges
// in 172/8), so the 172 block is matched exactly (172.16-172.31).
/^http:\/\/172\.(1[6-9]|2\d|3[01])\./.test(origin) ||
origin.startsWith('http://192.168.') ||
origin.startsWith('http://10.');

if (allowed) {
callback(null, true);
Expand Down
Loading