Event handlers support matrix
View the EdgeWorkers JavaScript objects, attributes, and functions each event type supports.
See Event handler functions for more information about the supported
event types.
Note: The onClientRequest,
onOriginRequest, onOriginResponse, and onClientResponse event handlers support the
GET
, HEAD
, POST
, PUT
, and DELETE
HTTP methods. The
responseProvider event handler currently only supports the GET
and HEAD
HTTP
methods.Event Handler | Use Cases | Methods |
---|---|---|
onClientRequest |
Redirect Management Traffic Filtering Allow / Deny Static Response Offload |
respondWith(status,headers,body,[deny_reason]) |
Header Management | ||
Cookie Management |
Cookies([cookieHeader], [options]) Note: To use these
Cookie Management methods, you need to import the Cookies module.
|
|
Delivery Property Flow Control | ||
Conditionally Route Traffic Personalization |
route(destination) | |
Cache Key Manipulation | ||
onOriginRequest | Header Management | |
Cookie Management |
Cookies([cookieHeader], [options]) Note: To use these
Cookie Management methods, you need to import the Cookies module.
|
|
Delivery Property Flow Control | ||
onOriginResponse | Header Management | |
Cookie Management |
Cookies([cookieHeader], [options]) Note: To use these
Cookie Management methods, you need to import the Cookies module.
|
|
Delivery Property Flow Control | ||
onClientResponse | Header Management | |
Cookie Management |
Cookies([cookieHeader], [options]) Note: To use these
Cookie Management methods, you need to import the Cookie module.
|
|
Delivery Property Flow Control | ||
responseProvider | Response Orchestration |
Note: To use these
responseProvider functions, you need to import the create-response, streams, text-encode-transform, and
http-request
modules.
|
Manipulate the response (body, headers) |