1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-10 15:43:12 +02:00

Add an option to check websocket Origin header via

listen {
	websocket {
		allow-origin { *.example.net; }
	}
}

This allows you to limit websockets to a particular domain, IF the
user is using a normal browser.

Note that any non-browser (eg a websocket command line program) could
just spoof the Origin header, so for that case it doesn't really add
any security or real restriction.
This commit is contained in:
Bram Matthys
2023-11-26 20:08:17 +01:00
parent 98c264aabf
commit 02ac1fc0b3
3 changed files with 38 additions and 1 deletions
+1
View File
@@ -1993,6 +1993,7 @@ struct ConfigItem_listen {
WebServer *webserver; /**< For the webserver module */
void (*start_handshake)(Client *client); /**< Function to call on accept() */
int websocket_options; /**< Websocket options (for the websocket module) */
NameList *websocket_origin; /**< List of permitted Origin */
int rpc_options; /**< For the RPC module */
};