gpt4 book ai didi

nginx grpc_pass 仅适用于 root

转载 作者:行者123 更新时间:2023-12-05 05:56:14 30 4
gpt4 key购买 nike

这个有效:

server {
listen 5005 http2;

location / {
grpc_pass grpc://my_app:5001;
}

default_type application/grpc;
}

这行不通:

server {
listen 5005 http2;

location /test {
grpc_pass grpc://my_app:5001;
}

default_type application/grpc;
}

当我转到 localhost:5005 时收到日志,它看起来像这样:

192.168.0.1 - - [20/Sep/2021:10:18:02 +0000] "POST /tasks.TasksServiceGRPC/AskForJob HTTP/2.0" 200 153 "-" "grpc-node/1.24.7 grpc-c/8.0.0 (windows; chttp2; ganges)" "-"

当我转到 localhost:5005/test 时,我什至没有在 nginx 中获取日志

在 http 1.1 上一切正常

最佳答案

由于请求结构的原因,使用 grpc 是不可能的

关于nginx grpc_pass 仅适用于 root,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69252894/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com