用header_filter_by_lua设置自定义HTTP头,


header_filter_by_lua的说明:

 


 

 

官网:https://github.com/openresty/lua-nginx-module#header_filter_by_lua

 

作用:

a)新增自定义的HTTP头

b)重新设置upstream返回的HTTP头,也就是起到覆盖作用

 

使用示范源码:nginx.conf

 


 

 

 

运行:openresty -p `pwd` -c conf/nginx.conf

 

运行结果:

 

原文出自:http://blog.csdn.net/daiyudong2020/article/details/53149242

相关内容

    暂无相关文章