【发布时间】:2021-09-14 07:23:47
【问题描述】:
nginx 可以通过后端服务验证请求,例如
location /somewhere_restricted {
auth_request /isallowed;
}
location = /isallowed {
proxy_pass backend_auth
}
但是,在每个 http 请求中都会检查 backend_auth。是否可以授权 TCP 套接字?套接字将被授权一次,然后通过它发出的所有 http 请求都将通过。注意我正在使用 http2
这就是 websocket 所发生的事情,但是对于普通的 http 请求,我需要相同的功能,但我还找不到与此相关的任何内容
【问题讨论】:
标签: http authentication nginx tcp request