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

Commit d305db0

Browse files
committed
fix: Update content-type for responses
1 parent 4ec3c1c commit d305db0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

utils/nitro_utils.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ inline drogon::HttpResponsePtr nitroHttpResponse() {
251251
LOG_INFO << "Respond for all cors!";
252252
resp->addHeader("Access-Control-Allow-Origin", "*");
253253
#endif
254+
resp->setContentTypeString("application/json");
254255
return resp;
255256
}
256257

@@ -273,6 +274,7 @@ inline drogon::HttpResponsePtr nitroStreamResponse(
273274
LOG_INFO << "Respond for all cors!";
274275
resp->addHeader("Access-Control-Allow-Origin", "*");
275276
#endif
277+
resp->setContentTypeString("application/json");
276278
return resp;
277279
}
278280

0 commit comments

Comments
 (0)