mirror of
https://github.com/XTLS/Xray-examples.git
synced 2024-11-26 02:21:27 +00:00
Fix[gRPC] nginx config (#30)
This commit is contained in:
parent
d95bf7142e
commit
784ab2ea15
|
@ -5,11 +5,11 @@ Xray client <--- gRPC(TLS) ---> Caddy2 <--- gRPC(cleartext) ---> Xray server
|
||||||
|
|
||||||
## Nginx:
|
## Nginx:
|
||||||
|
|
||||||
同时,您也可以选择使用 Nginx。示例配置片段如下(来自 @xiaoQzhuren):
|
同时,您也可以选择使用 Nginx。示例配置片段如下(来自 [@xqzr](https://github.com/xqzr)):
|
||||||
```conf
|
```conf
|
||||||
# 在 location 后填写 /{你的 ServiceName}
|
# 在 location 后填写 /{你的 ServiceName}
|
||||||
location {
|
location {
|
||||||
if ($request_method != "POST") {
|
if ($content_type !~ "application/grpc") {
|
||||||
return 404;
|
return 404;
|
||||||
}
|
}
|
||||||
client_max_body_size 0;
|
client_max_body_size 0;
|
||||||
|
|
Loading…
Reference in a new issue