docs(lua): update config format to match implementation

Replace unsupported shorthand fields (content_by_lua, etc.) with actual
scripts list format and global_settings structure.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
xfy 2026-05-09 09:49:33 +08:00
parent 8d3c9e0f6f
commit 2a532f8c28

View File

@ -459,22 +459,27 @@ compression:
```yaml ```yaml
lua: lua:
enabled: true enabled: true
package_path: "/etc/lolly/lua/?.lua" scripts:
package_cpath: "" - path: "/etc/lolly/rewrite.lua"
sandbox: true # 沙箱模式 phase: "rewrite"
timeout: 10s
# 执行阶段脚本 - path: "/etc/lolly/access.lua"
rewrite_by_lua: "/etc/lolly/rewrite.lua" phase: "access"
access_by_lua: "/etc/lolly/access.lua" - path: "/etc/lolly/content.lua"
content_by_lua: "/etc/lolly/content.lua" phase: "content"
header_filter_by_lua: "/etc/lolly/header_filter.lua" - path: "/etc/lolly/header_filter.lua"
body_filter_by_lua: "/etc/lolly/body_filter.lua" phase: "header_filter"
log_by_lua: "/etc/lolly/log.lua" - path: "/etc/lolly/body_filter.lua"
phase: "body_filter"
# 共享字典 - path: "/etc/lolly/log.lua"
shared_dicts: phase: "log"
cache: 10000 # 名称: 最大条目数 global_settings:
limit: 1000 max_concurrent_coroutines: 1000
coroutine_timeout: 30s
code_cache_size: 100
coroutine_stack_size: 64
minimize_stack_memory: true
coroutine_pool_warmup: 100
``` ```
### 执行阶段 ### 执行阶段