mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-12 07:59:29 -05:00
add CORS headers to rsEvents/registerEventsHandler
This commit is contained in:
parent
5b1b0cadf9
commit
bf41f8ad92
@ -361,11 +361,9 @@ JsonApiServer::JsonApiServer(): configMutex("JsonApiServer config"),
|
|||||||
[this](const std::shared_ptr<rb::Session> session)
|
[this](const std::shared_ptr<rb::Session> session)
|
||||||
{
|
{
|
||||||
const std::weak_ptr<rb::Service> weakService(mService);
|
const std::weak_ptr<rb::Service> weakService(mService);
|
||||||
const std::multimap<std::string, std::string> headers
|
auto headers = corsHeaders;
|
||||||
{
|
headers.insert({ "Connection", "keep-alive" });
|
||||||
{ "Connection", "keep-alive" },
|
headers.insert({ "Content-Type", "text/event-stream" });
|
||||||
{ "Content-Type", "text/event-stream" }
|
|
||||||
};
|
|
||||||
session->yield(rb::OK, headers);
|
session->yield(rb::OK, headers);
|
||||||
|
|
||||||
size_t reqSize = static_cast<size_t>(
|
size_t reqSize = static_cast<size_t>(
|
||||||
|
Loading…
Reference in New Issue
Block a user