question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cache headers not being set on AWS

See original GitHub issue

Not sure if I set it up badly, but I’m not getting cache headers on my asset responses

content-encoding: gzip
content-type: application/javascript; charset=utf-8
date: Thu, 21 May 2020 01:20:13 GMT
last-modified: Thu, 21 May 2020 00:17:17 GMT
server: AmazonS3
status: 200
vary: Accept-Encoding
via: 1.1 cc3ab544aae38adfcc35bb790a813e46.cloudfront.net (CloudFront)
x-amz-cf-id: T3zX8wNNw9_T3awgXh7Q2kplZ9bhlhJqjKJIUOwQJpt0Ms8-1E1Ong==
x-amz-cf-pop: SYD4-C2
x-cache: Miss from cloudfront

Can view here https://register.hatch.exchange/?homecompany=domain

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
evanderkooghcommented, May 21, 2020

Looks like the header do not actually get set. I have created a PR to add those to the S3 objects in the deployer in #186

0reactions
thejuancommented, May 21, 2020

Thanks, still blocked by #182 so can’t take this in yet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot issues with CloudFront custom object caching
If your CloudFront distribution isn't caching based on the custom values that you set on cache behaviors, then check the origin. Verify whether...
Read more >
Caching content based on request headers
When you configure CloudFront to cache based on one or more headers and the headers have more than one possible value, CloudFront forwards...
Read more >
Add a Cache-Control header to the response
Use Amazon CloudFront Functions to add a Cache-Control header to the HTTP response. ... var headers = response.headers; // Set the cache-control header ......
Read more >
Use HTTP headers to cache content in Amazon CloudFront
Open CloudFront console, and then choose your distribution. · Choose the Behaviors tab. · Choose Edit. · Under Cache key and origin requests, ......
Read more >
How do I prevent CloudFront from caching certain files?
Note: Be sure to update your CloudFront distribution's cache behavior to set Object Caching as Use Origin Cache Headers.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found