node.js - 如何从 NGINX 代理获取 TLS 会话 ID?
问题描述
在 Node.js 中,标头在 req.headers 中可用,我确实在 http 服务器中获取它们。我想获取由 Nginx 代理设置的 TLS 会话 ID,其中相关部分中的设置以及其他标头是:
location / {
...
proxy_set_header X-tlsSessionId $ssl_session_id;
...
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_buffering off;
expires off;
}
当我尝试将其作为 req.headers[x-tlssessionid] 访问时,我能够访问其他自定义标头但不能访问 X-tlsSessionId 我认为小写是我用来访问自定义标头的,但这个确实不行。
解决方案
推荐阅读
- sql-server - JPA + SQL:在 setMaxResults 中使用百分比查询
- python - Python在文件中查找连字符数字的范围
- python - 多特征因果 CNN - Keras 实现
- android - Android手动选择布局文件夹
- svg - 来自 PNG 的 SVG 图标
- snakemake - 总是报告错误:'str' 对象在我的 RNA-seq 工作流程的 snakemake 中不可调用
- ios - 使用 Firebase 更新 AppDelegate
- c++ - 如何为 FTP 实现二进制 (TYPE I)
- docker - 如何从 Docker 容器访问 Hyper-V 上的实例
- kendo-ui - 使用带有 ajax 表单的自定义窗口添加新的网格行