I want to be able to see the surrogate-control header in my compute code, but it seems that this is stripped out of the response headers before the compute code runs. Is this correct?
Is there any way to get hold of this information?
Also, this means that the behaviour when running locally with viceroy is different - the header remains in this case. But ideally you want the local environment to be as close as possible to the production environment for developing code.
Additionally or alternatively is there a way of getting the ttl as determined by the cache? In a VCL you can use beresp.ttl, but I can’t see an equivalent for compute?
1 Like
As it turns out, we are literally days (possibly a week) away from making a complete HTTP Cache API available for Compute applications written in Rust. The SDK and the docs address the TTL issues and many more, and probably even access to raw headers before they are consumed by the ‘cache semantics’ interpreter.
If you can hang on just a few days, you’ll be pleased
1 Like
Sounds interesting - although we’re using typescript for our compute stuff atm.
Ahh… support for JavaScript (and Go) will be coming later in the year, unfortunately.
So what about setting the Fastly-Debug header on the origin request, presumably this allows me to see the relevant info? But would it cause performance problems?