Hey, I have a cloudfront distribution with an s3 origin, and a cloudfront function that is attached to viewer response, that modified some headers.
It works fine on GET <http://example.com/index.html|example.com/index.html>
But not on GET <http://example.com|example.com>
- there’s not error, i just dont see the added headers.
the cloudfront function just add some headers, not conditions or something similar.
const request = event.request;
const response = event.response;
const headers = response.headers;
headers['custom-header'] = {value: 'value'};
return response;
}```
Any idea why the function is not pre processing the `GET /` request ?