Update init.lua

设置输出字符集选项为UTF-8,使HTML页面在GBK字符集环境下也能够正确显示,避免乱码
pull/72/head
ysyx2008 9 years ago
parent fa5bf74cbe
commit 3f13a5c133

@ -70,7 +70,7 @@ ckrules=read_rule('cookie')
function say_html() function say_html()
if Redirect then if Redirect then
ngx.header.content_type = "text/html" ngx.header.content_type = "text/html; charset=UTF-8"
ngx.status = ngx.HTTP_FORBIDDEN ngx.status = ngx.HTTP_FORBIDDEN
ngx.say(html) ngx.say(html)
ngx.exit(ngx.status) ngx.exit(ngx.status)

Loading…
Cancel
Save