-
简介
- 该插件用于整合在 OpenResty 或者安装了 lua 模块 的 Nginx 反向代理中,用于收集流量的 Web 端信息以提供给 GCloud 组件进行智能判断。
-
目录结构
- GNodePlugin
- GNode
- plugin.lua
- README.md
- GNode
- GNodePlugin
-
安装、整合及使用
-
依赖:
- lua-cjson,(OpenResty 内置)
- ngx_http_lua_module,(OpenResty 内置)
-
安装:
- 把 GNode 目录完整的拷贝到
/usr/local/openresty/lualib
目录下,即plugin.lua
的绝对路径为/usr/local/openresty/lualib/GNode/plugin.lua
。(如果自定义了 OpenResty 的安装目录,则需根据情况调整为(OpenResty 安装路径)/lualib/GNode
)
- 把 GNode 目录完整的拷贝到
-
整合:
-
修改 OpenResty 的配置文件,在需要防护的 location 块中添加如下代码以调用该插件:
access_by_lua_block { local plugin = require "GNode.plugin" plugin.run() }
示例:
server { listen 80; listen 443 ssl; ssl_certificate Crt/GNodeCA.crt; ssl_certificate_key Crt/GNodeCA.key; server_name test.com; error_log logs/error.log info; default_type text/html; client_body_buffer_size 256k; location / { access_by_lua_block { local plugin = require "GNode.plugin" plugin.run() } proxy_pass http://upstream1; } }
-
-
使用:
-
注意事项:
- 注意涉及到的 OpenResty 的安装目录要根据实际情况进行修改
- 本插件暂不支持 HTTP/2 协议
-
-
Notifications
You must be signed in to change notification settings - Fork 6
bot analyze openresty plugins
License
gtbotsonar/analyse-plugin-lua
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
bot analyze openresty plugins
Topics
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published