如果加charset utf-8没用的话;
可以在location块中加入以下内容:
header_filter_by_lua "
ngx.header.content_type='application/json;charset utf-8'
";
header_filter_by_lua: 该指令用于 设置应答消息的头部信息;
当在location块中添加charsetutf-8无效时,可以尝试使用header_filter_by_lua指令,设置ngx.header.content_type为'application/json;charset=utf-8'来确保响应头正确包含JSON的字符集。
如果加charset utf-8没用的话;
可以在location块中加入以下内容:
header_filter_by_lua "
ngx.header.content_type='application/json;charset utf-8'
";
header_filter_by_lua: 该指令用于 设置应答消息的头部信息;
1029

被折叠的 条评论
为什么被折叠?