update
Browse files
app.lua
CHANGED
|
@@ -26,9 +26,11 @@ ngx.say("pass_url: ", pass_url)
|
|
| 26 |
-- 根据版本号加载不同的 Lua 文件
|
| 27 |
local lua_path = "./app/" .. api_version .. "/app.lua"
|
| 28 |
ngx.say("lua_path: ", lua_path)
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
|
|
|
|
|
|
|
|
| 26 |
-- 根据版本号加载不同的 Lua 文件
|
| 27 |
local lua_path = "./app/" .. api_version .. "/app.lua"
|
| 28 |
ngx.say("lua_path: ", lua_path)
|
| 29 |
+
require(lua_path)
|
| 30 |
+
|
| 31 |
+
-- local status, err = pcall(require, lua_path)
|
| 32 |
+
-- if not status then
|
| 33 |
+
-- ngx.log(ngx.ERR, "failed to load lua file: ", lua_path, ", error: ", err)
|
| 34 |
+
-- ngx.say("Error: Failed to load API version: ", api_version)
|
| 35 |
+
-- ngx.exit(ngx.HTTP_INTERNAL_SERVER_ERROR)
|
| 36 |
+
-- end
|