diff options
Diffstat (limited to 'openresty-ext/src/assembly/resources/openresty/nginx/luaext/plugins/config_default.lua')
-rw-r--r-- | openresty-ext/src/assembly/resources/openresty/nginx/luaext/plugins/config_default.lua | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/openresty-ext/src/assembly/resources/openresty/nginx/luaext/plugins/config_default.lua b/openresty-ext/src/assembly/resources/openresty/nginx/luaext/plugins/config_default.lua index cbb3107..3790453 100644 --- a/openresty-ext/src/assembly/resources/openresty/nginx/luaext/plugins/config_default.lua +++ b/openresty-ext/src/assembly/resources/openresty/nginx/luaext/plugins/config_default.lua @@ -1,6 +1,6 @@ --[[ - Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + Copyright (C) 2017-2018 ZTE, Inc. and others. All rights reserved. (ZTE) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -19,9 +19,10 @@ local _M = {} _M._VERSION = '1.0.0' _M._DESCRIPTION = 'config_default' - +local str_util = require('lib.utils.str_util') +local mark_empty_as_nil = str_util.mark_empty_as_nil _M.plugins_default = { - {["name"] = "redirect-transformer",["status"] = "on"} + {["name"] = "redirect-transformer",["status"] = mark_empty_as_nil(os.getenv("MSB_REDIRECT_TRANSFORMER_PLUGIN")) or "on"} } -return _M
\ No newline at end of file +return _M |