nginx - 如何在 Nginx 上获取 :authority 标头?
问题描述
如何在 Nginx 上获取:authority http 标头?
HTTP/2 支持默认有 ":authority" 标头
我需要检查 $host 与 $http_authority 的匹配,但 $http_authority 为空。
if ( $http_authority ~* $host ) { return 405; }
谢谢
解决方案
use $http_host or $host replace $http_authority like http.
推荐阅读
- python - 如何在Django中返回两个团队的所有组合?
- javascript - 如何在javascript(nodejs)中读取带有订单保证的json文件?
- javascript - 检测点击块元素的文本部分
- spring-boot - 升级到 spring boot 2.1.3 到 2.1.4 在启动时给出 tomcat 异常
- python - 如何从 Neo4j 数据库中获取值的计数?
- azure - Azure AKS 自动缩放故障排除
- reactjs - data-binding radio field in redux-form
- opencv - 我们如何从旋转矩阵中找到θ?
- r - 两组变量之间的相关性
- javascript - 在 redux 中更新状态接收新道具,但由于哪个组件没有重新渲染,因此未在 componentWillReceiveProps 中设置状态