如何从Nginx中的cookie中提取一些值 [英] How to extract some value from cookie in nginx

查看:1108
本文介绍了如何从Nginx中的cookie中提取一些值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Nginx的新手,希望获得一些帮助.

I am new to Nginx and hope to get some help.

我想从nginx的浏览器cookie中提取某些数据(某些PHP脚本设置的字段),以便进行记录.如果可能的话,我只想通过修改nginx配置来做到这一点.

I want to extract certain data (certain fields set by my PHP scripts) from browser cookie in nginx so that I can log it. If possible, I want to do this just by modifying nginx configuration.

任何指针/帮助将不胜感激.

Any pointer/help would be greatly appreciated.

推荐答案

您可以使用$cookie_COOKIE_NAME_GOES_HERE变量来访问cookie值.

You can access cookie values by using the $cookie_COOKIE_NAME_GOES_HERE variable.

请参见 Nginx文档

这篇关于如何从Nginx中的cookie中提取一些值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆