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:
@@ -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 */
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user