diff mod_http_admin_api/mod_http_admin_api.lua @ 4364:49cf9d188b26

mod_http_admin_api: set content-type for debug API
author Jonas Schäfer <jonas@wielicki.name>
date Thu, 21 Jan 2021 15:51:07 +0100
parents 636d56bbad97
children f975a4d31f35
line wrap: on
line diff
--- a/mod_http_admin_api/mod_http_admin_api.lua	Thu Jan 21 14:42:11 2021 +0000
+++ b/mod_http_admin_api/mod_http_admin_api.lua	Thu Jan 21 15:51:07 2021 +0100
@@ -336,8 +336,10 @@
 	end
 
 	if property == "groups" then
+		event.response.headers["Content-Type"] = json_content_type;
 		return json.encode(get_user_groups(username));
 	elseif property == "debug" then
+		event.response.headers["Content-Type"] = json_content_type;
 		return json.encode(get_user_debug_info(username));
 	end