Construct Response
Construct a HTTP response, including a standard HTTP status code and a message you create, to be served from the Akamai edge server without retrieving the requested object from cache or requesting it from your origin.
For example, you can return an error response for a request that doesn't contain required cookies. You can also use this behavior to respond to requests for invalid paths or for content which doesn't exist.
How it works
This behavior constructs an HTTP response, complete with HTTP status code and body, to serve from the edge independently of your origin. It supports all request methods except for POST.
You can create a message of up to 2000 characters for the body of the response. If you exceed that limit, the response you constructed isn't sent and the client receives a 500 response code.
By default, edge servers evict any currently cached version of the object from cache, since it isn't being served. You can disable this functionality if the constructed response is temporary or only applies to certain requests and you want to serve cached content for some requests.
By default, edge servers ignore the Construct Response behavior when a purge request is made, in order to correctly purge the underlying object.
Don't use the Construct Response behavior with Bot Manager when you set up an alternate hostname to send bot traffic to an alternate page or site. Make sure the behavior is disabled in that case.
Features and options
| Field | What it does | Sub-options |
|---|---|---|
| Status | Enables or disables this behavior. | |
| Response Body | The HTML response you want the user to receive. Variable Support: This option supports variable expression syntax. Typing {{ in the option field triggers variable auto complete. Learn more about variable support. | |
| Response Code | The response code you want the user to receive. |
|
| Force Cache eviction | Evict the underlying object from cache. | |
| Ignore for Purge requests | Ignore this construct response for purge requests. |
Updated 2 days ago
