From 663f8a69d8aed4b733f0e2367fccbe95d2b2d1fc Mon Sep 17 00:00:00 2001 From: nianhua <1585346868@qq.com> Date: Wed, 19 Jun 2024 17:17:40 +0800 Subject: [PATCH] update --- config.ini | 8 ++++---- www/api/user.lua | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/config.ini b/config.ini index 8269712..bb30437 100644 --- a/config.ini +++ b/config.ini @@ -1,8 +1,8 @@ [variable] ;项目目录 -base=${current_dir} +base=${config_dir} ;网站程序目录 -www=${current_dir}/www +www=${config_dir}/www [scripts] ; 模块目录 @@ -24,7 +24,7 @@ Initialization_script= ; 调试模式,开启后启用LUA错误信息 (0=关闭 1=开启) debug=1 ; 绑定域名 -domain=local.newobj.org,127.0.0.1 +domain=local.newobj.org,0.0.0.0 ; 允许请求URL的路径直接映射到网站路径中的lua。如你的站点只允许订阅绑定模式,则设置为0关闭此功能以提高安全性。 direct_url_mapping=1 ; 最大上传大小限制(MB),0为不限制 @@ -62,7 +62,7 @@ ssl_ver_type=0 ; 端口,默认https为443,http为80 port=8566 -[127.0.0.1] +[0.0.0.0] https=0 port=8866 diff --git a/www/api/user.lua b/www/api/user.lua index fb29def..493eee2 100644 --- a/www/api/user.lua +++ b/www/api/user.lua @@ -25,7 +25,7 @@ local function login() end -- 验证账号密码 - if request.param("username") ~= "fastweb" or request.param("password") ~= "123456" then + if request.param("username",false) ~= "fastweb" or request.param("password",false) ~= "123456" then reply(201,"账号或密码不正确") return end @@ -58,8 +58,8 @@ local function getinfo() end -- 判断请求类型 -if request.param("action") == "login" then +if request.param("action",false) == "login" then login() -elseif request.param("action") == "getinfo" then +elseif request.param("action",false) == "getinfo" then getinfo() end \ No newline at end of file