title: Cache-Control headers in a Cloudflare Workers site
body: <p>I'm just testing Workers sites with a Hugo-created static site. It already existed, so I used the docs’ instructions for adapting an existing site. The <code>cache-control</code> headers for the <code>woff2</code> and <code>css</code> files all show up with <code>no-cache</code>, contrary to what I'd have expected based on <a href="https://support.cloudflare.com/hc/en-us/articles/200172516#h_a01982d4-d5b6-4744-bb9b-a71da62c160a" rel="nofollow noreferrer">https://support.cloudflare.com/hc/en-us/articles/200172516#h_a01982d4-d5b6-4744-bb9b-a71da62c160a</a>. The Workers site in question is <a href="https://hosts-test-hugo.brycewray.workers.dev/" rel="nofollow noreferrer">https://hosts-test-hugo.brycewray.workers.dev/</a>.</p>
  <p>I found the following at <a href="https://levelup.gitconnected.com/use-cloudflare-javascript-workers-to-deploy-you-static-generated-site-ssg-1c518e078646" rel="nofollow noreferrer">https://levelup.gitconnected.com/use-cloudflare-javascript-workers-to-deploy-you-static-generated-site-ssg-1c518e078646</a> but don't know if it's related:</p>
  <blockquote>
  <p>A Cloudflare Worker is a piece of JavaScript code that runs every time you access a specific route on a website proxied by Cloudflare. The code is executed on every request  <em>before</em>  they reach Cloudflare’s cache. This means Worker responses are not cached (although requests made by the worker to other web services might be cached with the appropriate caching headers).</p>
  </blockquote>
  <p>Does the site need to have a custom domain — i.e., rather than being a “.workers.dev” URL — before it will have normal caching behavior? Is that even related?</p>
  <p><em>[<strong>Note</strong>: I am posting this here because I’ve been unsuccessful in getting a response on either the <a href="https://community.cloudflare.com/t/how-to-set-cache-ttl-for-static-assets-with-workers-sites/150205/5" rel="nofollow noreferrer">Cloudflare community forum</a> or the <a href="https://www.reddit.com/r/CloudFlare/comments/j6havm/cachecontrol_headers_in_a_workers_site/" rel="nofollow noreferrer">Cloudflare subreddit</a> — hoping for better results here.]</em></p>