Fix JSON API mime type

Most clients expect application/json which is standard, instead
of text/json.
This commit is contained in:
David Gerber 2021-01-24 01:53:58 +01:00
parent 397460833e
commit a73ea961c6

View File

@ -101,7 +101,7 @@ JsonApiServer::corsOptionsHeaders =
ss << jAns; \
std::string&& ans(ss.str()); \
auto headers = corsHeaders; \
headers.insert({ "Content-Type", "text/json" }); \
headers.insert({ "Content-Type", "application/json" }); \
headers.insert({ "Content-Length", std::to_string(ans.length()) }); \
session->close(RET_CODE, ans, headers)