An example Akamai EdgeWorker script to harden the 'Set-Cookie' header(s) coming from Origin.
This Akamai EdgeWorker script, created by a couple of Dutch Akamai SE's, will run on the onClientResponse() event:
It's also possible to run this on the onOriginResponse() event but some advanced metadata is needed to forward the Set-Cookie header(s).
This script will use the Set-Cookie header(s) from origin and will set the following attributes:
- Secure
- HttpOnly
- SameSite=Strict
This/these new SetCookie object(s) will be added to the Response Object and forwarded to the client.