在Nginx子请求中通过Lua传递客户端证书的问题排查
问题描述
我尝试通过ngx.location.capture将客户端证书传递至子请求,但使用以下Lua函数时,代理并未成功传递客户端证书。
相关Lua函数代码
local function checkAuthentication(userRole) return ngx.location.capture("/v1/auth/cert/login", { method = ngx.HTTP_POST, body = cjson.encode({ name = userRole }), share_all_vars = true, ctx = ngx.ctx, }) end
相关Nginx配置片段
server { ... ssl_verify_client optional_no_ca; location / { proxy_pass https://22.0.0.2:8200; } location /v1/pki/revoke { rewrite_by_lua_file /var/lua/revoke.lua; proxy_pass https://22.0.0.2:8200; } }
内容的提问来源于stack exchange,提问作者Mime
相关产品推荐
相关产品推荐

