Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support immutable cache headers for _astro assets #9125

Merged
merged 7 commits into from
Nov 28, 2023
Merged

Support immutable cache headers for _astro assets #9125

merged 7 commits into from
Nov 28, 2023

Conversation

matthewp
Copy link
Contributor

@matthewp matthewp commented Nov 17, 2023

Changes

Testing

  • Test case added
  • Test to ensure that only stuff inside _astro is given the header.

Docs

N/A, bug fix

Copy link

changeset-bot bot commented Nov 17, 2023

🦋 Changeset detected

Latest commit: ec4d59e

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added pkg: integration Related to any renderer integration (scope) pr: docs A PR that includes documentation for review labels Nov 17, 2023
Copy link
Member

@natemoo-re natemoo-re left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems great!

.changeset/twelve-fishes-fail.md Outdated Show resolved Hide resolved
packages/integrations/node/src/http-server.ts Outdated Show resolved Hide resolved
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
@florian-lefebvre
Copy link
Member

florian-lefebvre commented Nov 17, 2023

Out of curiosity, could this also be done for other adapters with their respective folders? (ie. astro and vercel for the vercel adapter)

@matthewp
Copy link
Contributor Author

@florian-lefebvre it can be yes, the Vercel adapter already has it.

@florian-lefebvre
Copy link
Member

Oh ok, looking at the issue I assumed it was concerning every adapter. It may be worth saying it on adapters docs, because I suspect many people (me included) add those headers to vercel/netlify config but if it's done by default, that's even better!

@matthewp
Copy link
Contributor Author

@florian-lefebvre Yeah, Astro core isn't responsible for serving static assets. I agree on the docs, I'll add that to this PR.

@matthewp
Copy link
Contributor Author

Waiting on docs review before merging.

matthewp and others added 2 commits November 28, 2023 08:35
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
@matthewp matthewp merged commit 8f1d509 into main Nov 28, 2023
13 checks passed
@matthewp matthewp deleted the node-cc branch November 28, 2023 13:46
@astrobot-houston astrobot-houston mentioned this pull request Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: integration Related to any renderer integration (scope) pr: docs A PR that includes documentation for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Assets Cache-Control should be more aggressive
5 participants