[Web] move /process/login to internal endpoint
This commit is contained in:
@@ -152,13 +152,14 @@ function auth_password_verify(request, password)
|
||||
-- check against mailbox passwds
|
||||
local b, c = https.request {
|
||||
method = "POST",
|
||||
url = "https://nginx/api/v1/process/login",
|
||||
url = "https://nginx:9082",
|
||||
source = ltn12.source.string(req_json),
|
||||
headers = {
|
||||
["content-type"] = "application/json",
|
||||
["content-length"] = tostring(#req_json)
|
||||
},
|
||||
sink = ltn12.sink.table(res)
|
||||
sink = ltn12.sink.table(res),
|
||||
insecure = true
|
||||
}
|
||||
local api_response = json.decode(table.concat(res))
|
||||
if api_response.role == 'user' then
|
||||
@@ -182,13 +183,14 @@ function auth_password_verify(request, password)
|
||||
|
||||
local b, c = https.request {
|
||||
method = "POST",
|
||||
url = "https://nginx/api/v1/process/login",
|
||||
url = "https://nginx:9082",
|
||||
source = ltn12.source.string(req_json),
|
||||
headers = {
|
||||
["content-type"] = "application/json",
|
||||
["content-length"] = tostring(#req_json)
|
||||
},
|
||||
sink = ltn12.sink.table(res)
|
||||
sink = ltn12.sink.table(res),
|
||||
insecure = true
|
||||
}
|
||||
local api_response = json.decode(table.concat(res))
|
||||
if api_response.role == 'user' then
|
||||
|
Reference in New Issue
Block a user