Hi,
What is the VCL code to get the response body in VCL for a service?
thanks.
Hi,
What is the VCL code to get the response body in VCL for a service?
thanks.
Hey there,
The response body is not accessible in VCL services. You can access the response in Compute@Edge services, using a language of your choice (we officially support JavaScript, Rust and Go).
You can see a comparison of the two service types here:
https://developer.fastly.com/learning/
thanks.
Using Compute@Edge with JS code, How do you get the source and destination port and addresses?
I could get just the requests and response headers and body, using the implementation of the following scode:
addEventListener("fetch", (event) => event.respondWith(handleRequest(event.request)));