Enhanced debug headers for responseProvider
To enable enhanced debug headers for responseProvider the debug request must pass the akamai-x-ew-debug-rp Pragma header. The debug output for responseProvider is appended to the end of the body as the second part of a multi-part stream.
When you enable enhanced debugging for responseProvider caching is bypassed. This prevents the body, that contains debug data, from being stored in cache and delivered to other users.
When you include, akamai-x-ew-debug-rp in the request, the AK_EDGEWORKERS_RP_STATUS built-in variable:
- Returns an inaccurate status.
- Indicates success, even on a failure. This prevents
responseProvidererrors from being detected by Property Manager. - Prevents the Site Failover behavior from responding to an EdgeWorkers failover accurately.
To resolve this issue you need to remove the akamai-x-ew-debug-rp Pragma header when testing Site Failover.
- Use this EdgeWorkers CLI command to generate a JWT authentication token. In this example we set the token expiry to 60 minutes for the
www.example.comhostname. By default, the token expiry is set at 480 for 8 hours. You can set the token expiry to a value between 1 to 720 minutes.
- Here’s an example of an enhanced debug request header:
- This example shows the trace response headers with successful execution of the
responseProviderevent handler: