From 2efd4fbb3818f1ee24e674cc86090bbb0f17bb8c Mon Sep 17 00:00:00 2001 From: majinghe Date: Sun, 29 Nov 2020 19:24:36 +0800 Subject: [PATCH] zh-translation:docs/root/start/sandboxes/lua.rst --- docs/root/start/sandboxes/lua.rst | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/docs/root/start/sandboxes/lua.rst b/docs/root/start/sandboxes/lua.rst index c26dca7a3ee7..183d2a9eabeb 100644 --- a/docs/root/start/sandboxes/lua.rst +++ b/docs/root/start/sandboxes/lua.rst @@ -1,21 +1,17 @@ .. _install_sandboxes_lua: -Lua Filter +Lua 过滤器 ========== -In this example, we show how a Lua filter can be used with the Envoy -proxy. The Envoy proxy configuration includes a Lua -filter that contains two functions namely -``envoy_on_request(request_handle)`` and -``envoy_on_response(response_handle)`` as documented :ref:`here `. +在这个例子中,我们会展示 Lua 过滤器在 Envoy 代理中是如何使用的。 Envoy 代理配置包括一个 Lua 过滤器,此过滤器包含了在 :ref:`这个 ` 文档中记录的两个函数,即 ``envoy_on_request(request_handle)`` 和 ``envoy_on_response(response_handle)`` 。 -Running the Sandboxes -~~~~~~~~~~~~~~~~~~~~~ +运行沙盒 +~~~~~~~~ .. include:: _include/docker-env-setup.rst -Step 3: Build the sandbox -************************* +步骤 3:构建沙盒 +**************** .. code-block:: console @@ -30,12 +26,13 @@ Step 3: Build the sandbox lua_proxy_1 /docker-entrypoint.sh /bin Up 10000/tcp, 0.0.0.0:8000->8000/tcp, 0.0.0.0:8001->8001/tcp lua_web_service_1 node ./index.js Up 0.0.0.0:8080->80/tcp -Step 4: Send a request to the service -************************************* +Step 4: 给服务发送请求 +********************** -The output from the ``curl`` command below should include the headers ``foo``. -Terminal 1 +下面 ``curl`` 命令的输出结果应该包含头部 ``foo`` 。 + +终端 1 .. code-block:: console