💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
body_filter_by_lua_file ----------------------- **语法:** *body_filter_by_lua_file &lt;path-to-lua-script-file&gt;* **环境:** *http, server, location, location if* **阶段:** *output-body-filter* 除了通过文件`<path-to-lua-script-file>`的内容指定 Lua 代码外,该指令与[body_filter_by_lua](#body_filter_by_lua)是等价的,该指令从`v0.5.0rc32`开始支持[Lua/LuaJIT bytecode](#lualuajit-bytecode-support)的执行。 当给定了一个相对路径如`foo/bar.lua`,它将会被转换成绝对路径,前面增加的部分路径是 Nginx 服务启动时通过命令行选项`-p PATH`决定的`server prefix`。 该指令是在`v0.5.0rc32`版本第一次引入。 [返回目录](#directives) > English source: body_filter_by_lua_file ----------------------- **syntax:** *body_filter_by_lua_file &lt;path-to-lua-script-file&gt;* **context:** *http, server, location, location if* **phase:** *output-body-filter* Equivalent to [body_filter_by_lua](#body_filter_by_lua), except that the file specified by `<path-to-lua-script-file>` contains the Lua code, or, as from the `v0.5.0rc32` release, the [Lua/LuaJIT bytecode](#lualuajit-bytecode-support) to be executed. When a relative path like `foo/bar.lua` is given, they will be turned into the absolute path relative to the `server prefix` path determined by the `-p PATH` command-line option while starting the Nginx server. This directive was first introduced in the `v0.5.0rc32` release. [Back to TOC](#directives)