mirror of
https://github.com/Nystik-gh/ignis.git
synced 2026-06-17 04:35:53 +00:00
add server settings UI and enforcement
This commit is contained in:
@@ -14,14 +14,10 @@ function setupWebSocket(server, opts = {}) {
|
||||
throw new Error("setupWebSocket: opts.getVaultPath is required");
|
||||
}
|
||||
|
||||
let originSet = toOriginSet(originAllowlist);
|
||||
const originSet = toOriginSet(originAllowlist);
|
||||
|
||||
const wss = new WebSocketServer({ server, path: "/ws" });
|
||||
|
||||
wss.setOriginAllowlist = function (list) {
|
||||
originSet = toOriginSet(list);
|
||||
};
|
||||
|
||||
// Global message handlers: type -> handler(msg, ws).
|
||||
wss.messageHandlers = new Map();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user