新增固定上游的 HTTP/SSE 转发、Lua 插件生命周期和请求级进程隔离。 实现逐插件域名与内网白名单、DNS 地址固定、超时取消和受控错误收尾。 提供三个 Lua 示例插件、配置与开发文档、Docker 和 APISIX 部署示例。 通过 65 项测试及静态检查,验证真实 TCP 流式转发、取消、资源限制和 Windows 命令行启动。
40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
# Relative plugin paths resolve against this configuration file.
|
|
upstream: http://127.0.0.1:8000
|
|
listen_host: 0.0.0.0
|
|
listen_port: 8080
|
|
limits:
|
|
max_sessions: 4
|
|
hook_timeout_seconds: 5
|
|
lua_memory_bytes: 33554432
|
|
max_request_bytes: 2097152
|
|
max_response_bytes: 2097152
|
|
max_sse_frame_bytes: 262144
|
|
max_plugin_buffer_bytes: 1048576
|
|
max_host_calls_per_hook: 64
|
|
upstream_timeout_seconds: 120
|
|
plugins:
|
|
- id: request-rewrite
|
|
file: plugins/request_rewrite.lua
|
|
enabled: false
|
|
config:
|
|
prefix: ""
|
|
- id: stream-redact
|
|
file: plugins/stream_redact.lua
|
|
enabled: false
|
|
- id: network-review
|
|
file: plugins/network_review.lua
|
|
enabled: false
|
|
config:
|
|
url: https://review.example.com/check
|
|
network:
|
|
timeout_seconds: 3
|
|
max_response_bytes: 1048576
|
|
allow:
|
|
- domain: review.example.com
|
|
- domain: '*.review.example.com'
|
|
# Explicit intranet example: enable only after replacing with actual deployment values.
|
|
# - domain: review.internal.example.com
|
|
# scheme: http
|
|
# ports: [8080]
|
|
# cidrs: [10.20.0.0/16]
|