使用nginx lua在添加header头的时候,报错误,如下
2021/07/22 10:52:03 [error] 21260#0: *12944 attempt to set ngx.header.HEADER after sending out response headers, client: 10.1.102.212, server: , request: "GET /list/3830/ HTTP/1.1", host: "10.1.103.251:8182"
set ngx.header.HEADER after sending out response headers
如果修改header信息,需要在ngx.say ngx.print等之前,如果之后的话,就会报以上错误
阅读(4626) | 评论(0) | 转发(0) |