Enable validation according to WebSocket resource and origin.

This commit is contained in:
lotodore
2013-10-05 16:42:05 +02:00
parent 2c5dcc2ba0
commit a6f3536290
8 changed files with 33 additions and 13 deletions
+4 -1
View File
@@ -40,7 +40,8 @@
class ServerAcceptWebHelper : public ServerAcceptInterface
{
public:
ServerAcceptWebHelper(ServerCallback &serverCallback, boost::shared_ptr<boost::asio::io_service> ioService);
ServerAcceptWebHelper(ServerCallback &serverCallback, boost::shared_ptr<boost::asio::io_service> ioService,
const std::string &webSocketResource, const std::string &webSocketOrigin);
virtual void Listen(unsigned serverPort, bool ipv6, const std::string &logDir,
boost::shared_ptr<ServerLobbyThread> lobbyThread);
@@ -61,6 +62,8 @@ private:
ServerCallback &m_serverCallback;
boost::shared_ptr<server> m_webSocketServer;
SessionMap m_sessionMap;
std::string m_webSocketResource;
std::string m_webSocketOrigin;
boost::shared_ptr<ServerLobbyThread> m_lobbyThread;
};