1. 程式人生 > >nginx學習(十二)——nginx+lua入門

nginx學習(十二)——nginx+lua入門

for k, v in pairs(ngx.req.get_headers()) do
    ngx.say(k, ": ", v,"<br/>")
end
accept-language: zh-CN,zh;q=0.8,en;q=0.6
connection: keep-alive
accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
cache-control: max-age=0
host: xxcupid2.qunar.com
cookie: QN1=wKgZEVQZnqUYOwYuiRgrAg==; QN99=4120; QunarGlobal=192.168.50.31_67148a98_1488415b5bb_-5153|1410965762634; RcGlobal=b3254399612f86413f417d7ddc5150e583; QN48=tc_5381749a7fb28b87_1513e7cdd0a_dfc3; qunarGlobal=192.168.37.90_63ceea15_1548516e190_-11fe|1462522969703; Hm_lvt_75154a8409c0f82ecd97d538ff0ab3f3=1469430437,1470366457,1471245523; _s=s_LZQLCLFXVGZGDJGTEALPDNR3TE; QN269=82DFA140BBA511E5A42B105172262463; __ag_cm_=1473303607069; ag_fid=gvuZNcRiJzM5HZNF; _i=RB0t1Rn60WKxx76xiKdo2vNQv__x; _vi=qrSQCAUrG7YH1FZrOX3rI8A-EEdzsWWnAjFenZ9VbfuSo1AdyA1jKD6z5Ci0qxlEcuAsmW3_sATaRVr9ZVky0hPk3jS_sDblDFSt_4e11l21sYLGsN03rQRn6M2fj_JuSVHFVBBMD4jDTiMsbWqrjR_AA91E5-9e_0nGi0CN98sl
accept-encoding: gzip, deflate, sdch
upgrade-insecure-requests: 1
user-agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36