Configuration
This plugin is partially compatible with DB-less mode.
The functions will be executed, but if the configured functions attempt to write to the database, the writes will fail.
Compatible protocols
The Serverless Functions
plugin is compatible with the following protocols:
grpc
, grpcs
, http
, https
, ws
, wss
Parameters
Here's a list of all the parameters which can be used in this plugin's configuration:
-
name
string requiredThe name of the plugin, in this case
pre-function OR post-function
. -
instance_name
stringAn optional custom name to identify an instance of the plugin, for example
serverless-functions_my-service
. Useful when running the same plugin in multiple contexts, for example, on multiple services. -
service.name or service.id
stringThe name or ID of the service the plugin targets. Set one of these parameters if adding the plugin to a service through the top-level
/plugins
endpoint. Not required if using/services/SERVICE_NAME|SERVICE_ID/plugins
. -
route.name or route.id
stringThe name or ID of the route the plugin targets. Set one of these parameters if adding the plugin to a route through the top-level
/plugins
endpoint. Not required if using/routes/ROUTE_NAME|ROUTE_ID/plugins
. -
enabled
boolean default:true
Whether this plugin will be applied.
-
config
record required-
certificate
array of typestring
requiredArray of stringified Lua code to be cached and run in sequence during the certificate phase.
Note: This only runs on global plugins.
-
rewrite
array of typestring
requiredArray of stringified Lua code to be cached and run in sequence during the rewrite phase.
Note: This only runs on global plugins.
-
access
array of typestring
requiredArray of stringified Lua code to be cached and run in sequence during the access phase.
-
header_filter
array of typestring
requiredArray of stringified Lua code to be cached and run in sequence during the header_filter phase.
-
body_filter
array of typestring
requiredArray of stringified Lua code to be cached and run in sequence during the body_filter phase.
-
log
array of typestring
requiredArray of stringified Lua code to be cached and run in sequence during the log phase.
-
ws_handshake
array of typestring
required
-
ws_client_frame
array of typestring
required
-
ws_upstream_frame
array of typestring
required
-
ws_close
array of typestring
required
-