Jan 18, 2023 — respondWith support for the onOriginResponse event handler
2 months ago by firstname.lastname@example.org
You can now use
If you include both the construct-response in the metadata and
onOriginResponse event handler to :
- Construct a response based on the results of a conditional match of the response received from an origin server.
- Construct a custom error or redirect page if the origin responds with an error or redirect status code.
- Provide multiple choice, status code 300, origin response handling.
- If the origin replies with a list of URLs pointing to domains in various physical locations, you can apply a rule that:
- Uses the best geolocation match.
- Constructs a response using
responseWiththat includes only the relevant response.
- Handle 5xx errors from the origin, using a
respondWithredirect page that provides details about the original query instead of transferring the 5xx status code.
- Handle any type of origin response authentication procedure.
onOriginRequest event handler to:
- Test the outcome of a client-request metadata stage execution.
- Use the test results to make decisions based on variables set up during that stage.
- Validate the completion of a sub-request invoked using the
onClientRequestevent handler. If the attempt fails and information is missing from the request the results should be sent to Origin, and the flow terminated using