diff options
author | HuabingZhao <zhao.huabing@zte.com.cn> | 2016-09-29 19:43:46 +0800 |
---|---|---|
committer | HuabingZhao <zhao.huabing@zte.com.cn> | 2016-09-29 19:43:55 +0800 |
commit | 5dca3b4bcc1ed4327099907b335d0a56cd27c6a2 (patch) | |
tree | 2091fdaa879d3c254015e85d78c2dd6f23aa12ca /msb-core | |
parent | a1d290a799a2b2278c7d09081d72e7eed16b7eb2 (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')
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"; |