Add access to HTTP request headers in websocket_connection
This commit is contained in:
parent
c1361d8cf9
commit
aed35f5b06
2 changed files with 7 additions and 0 deletions
|
|
@ -29,6 +29,8 @@ namespace fc { namespace http {
|
|||
void set_session_data( fc::any d ){ _session_data = std::move(d); }
|
||||
fc::any& get_session_data() { return _session_data; }
|
||||
|
||||
virtual std::string get_request_header(const std::string& key) = 0;
|
||||
|
||||
fc::signal<void()> closed;
|
||||
private:
|
||||
fc::any _session_data;
|
||||
|
|
|
|||
|
|
@ -168,6 +168,11 @@ namespace fc { namespace http {
|
|||
_ws_connection->close(code,reason);
|
||||
}
|
||||
|
||||
virtual std::string get_request_header(const std::string& key)override
|
||||
{
|
||||
return _ws_connection->get_request_header(key);
|
||||
}
|
||||
|
||||
T _ws_connection;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue