doc: fixed error in serverless plugin. (#1006)

This commit is contained in:
WenMing 2019-12-30 20:28:36 +08:00 committed by YuanSheng Wang
parent 101fe73525
commit 1069c3d32d
3 changed files with 7 additions and 9 deletions

View File

@ -61,12 +61,10 @@ curl -i http://127.0.0.1:9080/apisix/admin/routes/1 -X PUT -d '
{
"uri": "/index.html",
"plugins": {
"plugins": {
"serverless-pre-function": {
"phase": "rewrite",
"functions" : ["return function() ngx.log(ngx.ERR, 'serverless pre function'); end"]
}
},
"serverless-pre-function": {
"phase": "rewrite",
"functions" : ["return function() ngx.log(ngx.ERR, \"serverless pre function\"); end"]
}
},
"upstream": {
"type": "roundrobin",

View File

@ -75,7 +75,7 @@ curl -i http://127.0.0.1:9080/apisix/admin/routes/1 -X PUT -d '
"plugins": {
"serverless-pre-function": {
"phase": "rewrite",
"functions" : ["return function() ngx.log(ngx.ERR, 'serverless pre function'); end"]
"functions" : ["return function() ngx.log(ngx.ERR, \"serverless pre function\"); end"]
}
},
"upstream": {

View File

@ -75,7 +75,7 @@ local function report()
end
end
core.log.warn(core.json.encode(etcd_version))
core.log.info(core.json.encode(etcd_version))
local info = {
version = core.version,
@ -92,7 +92,7 @@ local function report()
core.log.error("failed to encode hearbeat information: ", err)
return
end
core.log.warn("heartbeat body: ", args)
core.log.info("heartbeat body: ", args)
local res
res, err = request_apisix_svr(args)