Repository: nervosnetwork/ckb (language: rust)

Issue:
Nginx API Gateway examples
## Feature Request

#### Is your feature request related to a problem? Please describe.

As said in the [[CKB RPC document](https://github.com/nervosnetwork/ckb/tree/develop/rpc)](https://github.com/nervosnetwork/ckb/tree/develop/rpc),

> Allowing arbitrary machines to access the JSON-RPC port (using the `rpc.listen_address` configuration option) is dangerous and strongly discouraged. Please strictly limit the access to only trusted machines.

But there's no documents about how to configure the RPC access control.

#### Describe the solution you'd like

This issue asks for example configurations of the API gateway for CKB. Except the popular gateway Nginx, it's also welcome to contribute examples for other gateways such as Caddy.

The recommended scenarios for the examples:

- How to limit access by source IP.
- How to set up simple HTTP basic auth.
- How to limit access by RPC method.
- How to throttle the RPC requests.
- Basic gotchas, for example, the default body size is not enough to submit a fully packaged block.
Nginx API Gateway examples
## Feature Request

#### Is your feature request related to a problem? Please describe.

As said in the [[CKB RPC document](https://github.com/nervosnetwork/ckb/tree/develop/rpc)](https://github.com/nervosnetwork/ckb/tree/develop/rpc),

> Allowing arbitrary machines to access the JSON-RPC port (using the `rpc.listen_address` configuration option) is dangerous and strongly discouraged. Please strictly limit the access to only trusted machines.

But there's no documents about how to configure the RPC access control.

#### Describe the solution you'd like

This issue asks for example configurations of the API gateway for CKB. Except the popular gateway Nginx, it's also welcome to contribute examples for other gateways such as Caddy.

The recommended scenarios for the examples:

- How to limit access by source IP.
- How to set up simple HTTP basic auth.
- How to limit access by RPC method.
- How to throttle the RPC requests.
- Basic gotchas, for example, the default body size is not enough to submit a fully packaged block.


Discussion / hints:
https://github.com/jiangxianliang007/ckb-nginx-proxy
> https://github.com/jiangxianliang007/ckb-nginx-proxy

Migrated to https://github.com/cryptape/ckb-nginx-proxy
I added a topic [#ckb-rpc-proxy](https://github.com/topics/ckb-rpc-proxy) to https://github.com/cryptape/ckb-nginx-proxy . Once GitHub has indexed the repository under the topic, we can add the topic link in the RPC doc.
https://github.com/jiangxianliang007/ckb-nginx-proxy
> https://github.com/jiangxianliang007/ckb-nginx-proxy

Migrated to https://github.com/cryptape/ckb-nginx-proxy
I added a topic [#ckb-rpc-proxy](https://github.com/topics/ckb-rpc-proxy) to https://github.com/cryptape/ckb-nginx-proxy . Once GitHub has indexed the repository under the topic, we can add the topic link in the RPC doc.

Fix patch:
diff --git a/rpc/README.md b/rpc/README.md
index 155bcbe998..e7a06bb09d 100644
--- a/rpc/README.md
+++ b/rpc/README.md
@@ -6,6 +6,8 @@ Allowing arbitrary machines to access the JSON-RPC port (using the `rpc.listen_a
 
 CKB JSON-RPC only supports HTTP now. If you need SSL, please set up a proxy via Nginx or other HTTP servers.
 
+See [list of projects](https://github.com/topics/ckb-rpc-proxy) to setup the proxy for the RPC server.
+
 Subscriptions require a full duplex connection. CKB offers such connections in the form of TCP (enable with `rpc.tcp_listen_address` configuration option) and WebSockets (enable with `rpc.ws_listen_address`).
 
 ## JSONRPC Deprecation Process


Test patch: