Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit da5aa66

Browse files
authored
Merge pull request #478 from janhq/477-feat-add-json-header-to-nitro-utils
feat: set content type string for json properly
2 parents 5959819 + d60febb commit da5aa66

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

utils/nitro_utils.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ inline drogon::HttpResponsePtr nitroHttpJsonResponse(const Json::Value &data) {
233233
LOG_INFO << "Respond for all cors!";
234234
resp->addHeader("Access-Control-Allow-Origin", "*");
235235
#endif
236+
resp->setContentTypeString("application/json");
236237
return resp;
237238
};
238239

0 commit comments

Comments
 (0)