25 lines
678 B
Lua
Executable File
25 lines
678 B
Lua
Executable File
local session = require"resty.session".open()
|
|
|
|
if (string.find(ngx.var.location, "/video") ~= nil) then
|
|
if (session == nil or session.data.identify == nil) then
|
|
-- ngx.say("请先登陆");
|
|
ngx.exit(ngx.HTTP_FORBIDDEN);
|
|
end
|
|
end
|
|
|
|
for i, v in pairs(private_folder) do
|
|
if (string.find(ngx.var.location, "/blog/" .. v) ~= nil) then
|
|
if (session == nil or session.data.identify == nil) then
|
|
ngx.say("请先登陆");
|
|
-- ngx.exit(ngx.HTTP_FORBIDDEN);
|
|
end
|
|
end
|
|
end
|
|
|
|
-- if (ngx.var.location == "/blog/list") then
|
|
|
|
-- elseif (session == nil or session.data.identify == nil) then
|
|
-- ngx.say("请先登陆");
|
|
-- end
|
|
|