summaryrefslogtreecommitdiffstats
path: root/msb-core
diff options
context:
space:
mode:
authorHuabingZhao <zhao.huabing@zte.com.cn>2016-09-29 19:43:46 +0800
committerHuabingZhao <zhao.huabing@zte.com.cn>2016-09-29 19:43:55 +0800
commit5dca3b4bcc1ed4327099907b335d0a56cd27c6a2 (patch)
tree2091fdaa879d3c254015e85d78c2dd6f23aa12ca /msb-core
parenta1d290a799a2b2278c7d09081d72e7eed16b7eb2 (diff)
MSB should pass the request with X_Driver_Parameter header to driver mgr. plugin
Issue-Id: OCS-94 Change-Id: If86c076cef537c6d9ff1b122f5b63653e62ba599 Signed-off-by: HuabingZhao <zhao.huabing@zte.com.cn>
Diffstat (limited to 'msb-core')
-rw-r--r--msb-core/eag-openresty-ext/src/assembly/resources/openresty/nginx/sites-enabled/openomsb.conf9
-rw-r--r--msb-core/openresty-ext/src/assembly/resources/openresty/nginx/sites-enabled/openomsb.conf9
2 files changed, 18 insertions, 0 deletions
diff --git a/msb-core/eag-openresty-ext/src/assembly/resources/openresty/nginx/sites-enabled/openomsb.conf b/msb-core/eag-openresty-ext/src/assembly/resources/openresty/nginx/sites-enabled/openomsb.conf
index 2b9f806..c0ffe3c 100644
--- a/msb-core/eag-openresty-ext/src/assembly/resources/openresty/nginx/sites-enabled/openomsb.conf
+++ b/msb-core/eag-openresty-ext/src/assembly/resources/openresty/nginx/sites-enabled/openomsb.conf
@@ -58,6 +58,15 @@ server {
proxy_pass http://$backend;
}
location ~ ^/openoapi/([^/]+)(/[Vv][^/]*)?(.*) {
+
+ #Send requests to Driver Mgr. if 'X_Driver_Parameter' header found in the request
+ if ($http_X_Driver_Parameter) {
+ access_by_lua_block {
+ local driver_manager = require('plugins.driver_manager')
+ driver_manager.access()
+ }
+ }
+
set $apiname $1;
set $apiversion $2;
set $apiserver "fallback";
diff --git a/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/sites-enabled/openomsb.conf b/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/sites-enabled/openomsb.conf
index 0b9ddda..dd5375d 100644
--- a/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/sites-enabled/openomsb.conf
+++ b/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/sites-enabled/openomsb.conf
@@ -58,6 +58,15 @@ server {
proxy_pass http://$backend;
}
location ~ ^/openoapi/([^/]+)(/[Vv][^/]*)?(.*) {
+
+ #Send requests to Driver Mgr. if 'X_Driver_Parameter' header found in the request
+ if ($http_X_Driver_Parameter) {
+ access_by_lua_block {
+ local driver_manager = require('plugins.driver_manager')
+ driver_manager.access()
+ }
+ }
+
set $apiname $1;
set $apiversion $2;
set $apiserver "fallback";