diff options
| author | 2019-11-29 11:11:11 +0000 | |
|---|---|---|
| committer | 2019-11-29 11:11:11 +0000 | |
| commit | 965460400b271a178cc415783414de43c89341bf (patch) | |
| tree | 62ba3376782bafd2b2c9158bec39a8a643c6c3f1 /src/modules/m_websocket.cpp | |
| parent | WebSocket: replace the behindproxy switch with a proxy IP list. (diff) | |
| download | inspircd++-965460400b271a178cc415783414de43c89341bf.tar.gz inspircd++-965460400b271a178cc415783414de43c89341bf.tar.bz2 inspircd++-965460400b271a178cc415783414de43c89341bf.zip | |
WebSocket: move the OriginList typedef inside WebSocketConfig.
Diffstat (limited to 'src/modules/m_websocket.cpp')
| -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)) { |
