mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 07:29:33 -05:00
Merge pull request #2386 from rottencandy/event-api-cors
Include CORS headers in response for rsEvents/registerEventsHandler
This commit is contained in:
commit
a6573826b2
@ -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