[why] the table in the function split is used as a variable elsewhere. error: Attempt to call field 'insert' (a nil value)
[how] table => dirs
Signed-off-by: cuiyili 2268260388@qq.com --- container/result-webdav/nginx.conf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/container/result-webdav/nginx.conf b/container/result-webdav/nginx.conf index af27653..8b54314 100644 --- a/container/result-webdav/nginx.conf +++ b/container/result-webdav/nginx.conf @@ -61,13 +61,13 @@ http { ngx.exit(ngx.HTTP_FORBIDDEN) end
- if string.find(res, ",") then - table = split(res,",") - for i = 1, #table do - if string.find(path, table[i]) then + if string.find(res, ",", 1, true) then + dirs = split(res, ",") + for i = 1, #dirs do + if string.find(path, dirs[i], 1, true) then return end - end + end else if string.find(path, res, 1, true) then return