summaryrefslogtreecommitdiffstats
path: root/msb-core
diff options
context:
space:
mode:
authors71221 <sukeshac@huawei.com>2016-11-26 09:43:32 +0800
committers71221 <sukeshac@huawei.com>2016-11-26 09:59:43 +0800
commit54df7bee159a6f2eb0915ca02bb3b7c38fef5183 (patch)
treeccc264a2b8b1c8a32141cff7b94e16a7af2bc4c4 /msb-core
parent78c23a6a8b4a53ea594f6c68afbb6729867b08f9 (diff)
merge changes from SUN
change the login lua setting's white list. make the login 's dependency ok. OCS-129" target="_blank">https://jira.open-o.org/browse/OCS-129 Change-Id: I25310d4107932a562aff2f0e2e485dd5f2f802ce Signed-off-by: s71221 <sukeshac@huawei.com>
Diffstat (limited to 'msb-core')
-rw-r--r--msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/plugins/auth.lua12
-rw-r--r--msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/plugins/driver_manager.lua4
2 files changed, 12 insertions, 4 deletions
diff --git a/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/plugins/auth.lua b/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/plugins/auth.lua
index 0bec85c..1572060 100644
--- a/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/plugins/auth.lua
+++ b/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/plugins/auth.lua
@@ -20,12 +20,18 @@ _M._VERSION = '1.0.0'
local auth_url = '/openoapi/auth/v1';
local auth_token_url = auth_url..'/tokens';
local auth_token_key = "X-Auth-Token";
-local redirect_url = "/openoui/auth/v1/login/html/login.html"
+local redirect_url = "/openoui/common/login.html"
local white_list= {
auth_token_url,
redirect_url,
- '/openoui/auth/v1/login/'
+ '/openoui/common/css',
+ '/openoui/common/js',
+ '/openoui/common/thirdparty',
+ '/openoui/common/i18n',
+ '/openoui/common/image',
+ '/openoui/common/login.html',
+ '/openoui/common/json'
};
local function verify_value(value)
@@ -104,7 +110,7 @@ local function get_service_url()
proto = "http://";
end
--get url
- local uri = ngx.var.rui;
+ local uri = ngx.var.uri;
--form complete service url.
--local complete_url = proto..host..port..url
local complete_url = uri;
diff --git a/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/plugins/driver_manager.lua b/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/plugins/driver_manager.lua
index fac8a64..45d327d 100644
--- a/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/plugins/driver_manager.lua
+++ b/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/plugins/driver_manager.lua
@@ -104,7 +104,9 @@ function _M.access()
local actual_body = get_body_params()
ngx.log(ngx.ERR, "HTTP request to driver... ", " Request to driver manager")
- local res, err = http.new():request_uri(driver_url, {
+ local httpc = http.new();
+ httpc:set_timeout(300000);
+ local res, err = httpc:request_uri(driver_url, {
method = ngx.req.get_method(),
body = actual_body,
headers = actual_headers