We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
如果consul开启了ACL, 就必须传入一个token 才能访问里面的数据
The text was updated successfully, but these errors were encountered:
代码地址:https://github.com/weibocom/nginx-upsync-module/blob/master/src/ngx_http_upsync_module.c
代码片段:包含【?recurse】
2702行: { ngx_sprintf(request, "GET %V?recurse&index=%uL HTTP/1.0\r\nHost: %V\r\n" "Accept: */*\r\n\r\n", &upscf->upsync_send, upsync_server->index, &upscf->upsync_host); } 3795行: { ngx_sprintf(request, "GET %V?recurse&index=%uL HTTP/1.0\r\nHost: %V\r\n" "Accept: */*\r\n\r\n", &upscf->upsync_send, upsync_server->index, &upscf->[conf_server.name);](http://192.168.6.120:8090/pages/conf_server.name);) }
解决办法:把?recurse删除掉,变成
2702行: { ngx_sprintf(request, "GET %V&index=%uL HTTP/1.0\r\nHost: %V\r\n" "Accept: */*\r\n\r\n", &upscf->upsync_send, upsync_server->index, &upscf->upsync_host); } 3795行: { ngx_sprintf(request, "GET %V&index=%uL HTTP/1.0\r\nHost: %V\r\n" "Accept: */*\r\n\r\n", &upscf->upsync_send, upsync_server->index, &upscf->[conf_server.name);](http://192.168.6.120:8090/pages/conf_server.name);) }
修改后,将模块编译到nginx中,在upstream中配置如下 Consul开启ACL upsync domain:8500/v1/kv/upstreams/h5_shop?token=xxxxxxxxxxxxxxxxxxxxxxxxxx&recurse Consul未开启ACL upsync domain:8500/v1/kv/upstreams/h5_shop?recurse
已经测试过是OK的
Sorry, something went wrong.
No branches or pull requests
如果consul开启了ACL, 就必须传入一个token 才能访问里面的数据
The text was updated successfully, but these errors were encountered: