mirror of
https://gitee.com/iresty/apisix.git
synced 2024-12-05 05:27:35 +08:00
doc: fixed error in serverless plugin. (#1006)
This commit is contained in:
parent
101fe73525
commit
1069c3d32d
@ -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",
|
||||
|
@ -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": {
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user