diff options
author | Peter Powell <petpow@saberuk.com> | 2019-11-29 11:11:11 +0000 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2019-11-29 11:11:11 +0000 |
commit | 965460400b271a178cc415783414de43c89341bf (patch) | |
tree | 62ba3376782bafd2b2c9158bec39a8a643c6c3f1 | |
parent | afb5972ab54d64f8c4e7b09962fb2088e427920b (diff) |
WebSocket: move the OriginList typedef inside WebSocketConfig.
-rw-r--r-- | src/modules/m_websocket.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/modules/m_websocket.cpp b/src/modules/m_websocket.cpp index ee1c00e97..5f0f9bcc8 100644 --- a/src/modules/m_websocket.cpp +++ b/src/modules/m_websocket.cpp @@ -25,14 +25,13 @@ #include <utf8.h> -typedef std::vector<std::string> OriginList; - static const char MagicGUID[] = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; static const char whitespace[] = " \t\r\n"; static dynamic_reference_nocheck<HashProvider>* sha1; struct WebSocketConfig { + typedef std::vector<std::string> OriginList; typedef std::vector<std::string> ProxyRanges; // The HTTP origins that can connect to the server. @@ -329,7 +328,7 @@ class WebSocketHook : public IOHookMiddle if (originheader.Find(recvq, "Origin:", 7, reqend)) { const std::string origin = originheader.ExtractValue(recvq); - for (OriginList::const_iterator iter = config.allowedorigins.begin(); iter != config.allowedorigins.end(); ++iter) + for (WebSocketConfig::OriginList::const_iterator iter = config.allowedorigins.begin(); iter != config.allowedorigins.end(); ++iter) { if (InspIRCd::Match(origin, *iter, ascii_case_insensitive_map)) { |