Authored by chunhua.zhang

bug fix

1 -# copy sec.config.json to remote openresty server and reload nginx 1 +# copy /root/.cert/sec.config.json to remote openresty server and reload nginx
2 - hosts: sec 2 - hosts: sec
3 tasks: 3 tasks:
4 - name: copy lua and config files 4 - name: copy lua and config files
@@ -93,7 +93,6 @@ function get_redirect_url() @@ -93,7 +93,6 @@ function get_redirect_url()
93 local redirectPath = "/apigateway" 93 local redirectPath = "/apigateway"
94 local awsPath = "/apiaws" 94 local awsPath = "/apiaws"
95 95
96 - init_read_body()  
97 96
98 -- get params 97 -- get params
99 local force_uid = switch_controller.get_force_uid() 98 local force_uid = switch_controller.get_force_uid()
@@ -122,6 +121,9 @@ end @@ -122,6 +121,9 @@ end
122 ---- main 121 ---- main
123 function main() 122 function main()
124 123
  124 +
  125 + init_read_body()
  126 +
125 local _status, _msg = pcall(do_degrade) 127 local _status, _msg = pcall(do_degrade)
126 if not _status then 128 if not _status then
127 ngx.log(ngx.ERR, "call method [do_degrade] failed.", _msg) 129 ngx.log(ngx.ERR, "call method [do_degrade] failed.", _msg)