websocket.hpp (b2896149c39967dd9d1ee79357bdc53537cfabd7) | websocket.hpp (1873a04f43bb414408d1da9a5a775c05474603d2) |
---|---|
1#pragma once 2#include "async_resp.hpp" 3#include "http_body.hpp" 4#include "http_request.hpp" 5 6#include <boost/asio/buffer.hpp> 7#include <boost/beast/core/multi_buffer.hpp> 8#include <boost/beast/websocket.hpp> --- 78 unchanged lines hidden (view full) --- 87 ws.get_executor().context()); 88 } 89 90 void start(const crow::Request& req) 91 { 92 BMCWEB_LOG_DEBUG("starting connection {}", logPtr(this)); 93 94 using bf = boost::beast::http::field; | 1#pragma once 2#include "async_resp.hpp" 3#include "http_body.hpp" 4#include "http_request.hpp" 5 6#include <boost/asio/buffer.hpp> 7#include <boost/beast/core/multi_buffer.hpp> 8#include <boost/beast/websocket.hpp> --- 78 unchanged lines hidden (view full) --- 87 ws.get_executor().context()); 88 } 89 90 void start(const crow::Request& req) 91 { 92 BMCWEB_LOG_DEBUG("starting connection {}", logPtr(this)); 93 94 using bf = boost::beast::http::field; |
95 std::string protocolHeader = req.req[bf::sec_websocket_protocol]; | 95 std::string protocolHeader{ 96 req.getHeaderValue(bf::sec_websocket_protocol)}; |
96 97 ws.set_option(boost::beast::websocket::stream_base::decorator( 98 [session{session}, 99 protocolHeader](boost::beast::websocket::response_type& m) { 100 101#ifndef BMCWEB_INSECURE_DISABLE_CSRF_PREVENTION 102 if (session != nullptr) 103 { --- 284 unchanged lines hidden --- | 97 98 ws.set_option(boost::beast::websocket::stream_base::decorator( 99 [session{session}, 100 protocolHeader](boost::beast::websocket::response_type& m) { 101 102#ifndef BMCWEB_INSECURE_DISABLE_CSRF_PREVENTION 103 if (session != nullptr) 104 { --- 284 unchanged lines hidden --- |