docker - 拦截 websocket 并使用 NGINX 附加一个新令牌
问题描述
在我做这个代理之前
location /ws/streams/ {
rewrite \/ws\/streams\/(\d+) /streams/$1?token=TOKEN break;
proxy_pass https://www.stream.com;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
但现在我需要令牌是动态的(它每小时到期)
我需要以某种方式获取该令牌并将其附加到该 TOKEN 变量中。这个新令牌是通过使用 'application/x-www-form-urlencoded' 作为 'Content-Type' 的 POST 请求来请求的
如果有人可以帮助我,我将不胜感激
提前致谢
解决方案
推荐阅读
- java - 执行步骤masterStep Execption Loading data to mysql Spring Batch时遇到错误
- c# - 可能 64 位 Windows 分配虚拟内存超过 7FFF'FFFF'FFFF?
- apache-pig - 计算数据中有多少个不同长度的单词,例如,(8,1) (words, length)
- java - 使用 apache-poi 4.0.1 库将单元格内容的某些部分设置为粗体/斜体
- node.js - 获取日历列表时需要登录错误
- android - 刚安装的安卓模拟器一直说设置,谷歌已经停止在Parallel Desktop中工作
- angular - Angular 6 Form Array 无法在 ng-container 中访问
- vb.net - 赋予对象透明度但仍然难以处理(因此可以看到它下面的其他对象)
- php - 一次提交插入多行时如何找出数据库中是否存在行
- excel - MacOS excel的这段代码相当于什么?