Skip to content

Commit

Permalink
Merge pull request envoyproxy#223 from majinghe/mjh-start-lua
Browse files Browse the repository at this point in the history
zh-translation:docs/root/start/sandboxes/lua.rst
  • Loading branch information
helight authored Dec 3, 2020
2 parents 00af8fe + 2efd4fb commit b4a0ec4
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions docs/root/start/sandboxes/lua.rst
Original file line number Diff line number Diff line change
@@ -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 <config_http_filters_lua>`.
在这个例子中,我们会展示 Lua 过滤器在 Envoy 代理中是如何使用的。 Envoy 代理配置包括一个 Lua 过滤器,此过滤器包含了在 :ref:`这个 <config_http_filters_lua>` 文档中记录的两个函数,即 ``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
Expand All @@ -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
Expand Down

0 comments on commit b4a0ec4

Please sign in to comment.