Delay in cloudfront when it is proxied via Kong

We are using kong for proxy , my upstream url is a AWS cloudfront url , something.cloudfront.net.

When I directly hit the cloudfront url on the browser, page load speed is very fast (3 seconds)

But when I have the cloudfront url proxied through kong, the page load speed is super slow (1 minute)

I changed the upstream cloudfront url to the s3 endpoint of the bucket, the page load speed is (15 seconds)

Question - what setting or plugin should I add in kong to proxy pass the cloud front url(compression of object enabled -content-encoding:gzip ) and use cloud front’s functionality for faster page load.

I want to use Kong to proxy our cloudfront url and not have a delay of 1 minute to load the page. Please provide suggestions or fixes on how I can use kong to proxy to cloudfront.

Thxs.

Response header looks like this:

Age:3940
Connection:keep-alive
Content-Encoding:gzip
Content-Type:application/javascript; charset=UTF-8
Server:AmazonS3
Transfer-Encoding:chunked
Vary:Accept-Encoding
Via:kong/0.11.0
X-Amz-Cf-Id:tXSh3wz6VTecQpwUomekRAXuZXo6Dsssa5J28aHI9vvjwIzJg4clPMeeIzQOw==
x-amz-version-id:_6bAtoxcajtQ1ptw7HFazAbdgYe4W.2_E1a
X-Cache:Hit from cloudfront
X-Kong-Proxy-Latency:0
X-Kong-Upstream-Latency:36

Dir you get any reply ? we have similar case