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

Return Etag when serving images #142

Closed
Barbapapazes opened this issue Jun 5, 2024 · 1 comment · Fixed by #147
Closed

Return Etag when serving images #142

Barbapapazes opened this issue Jun 5, 2024 · 1 comment · Fixed by #147
Labels
enhancement New feature or request

Comments

@Barbapapazes
Copy link
Contributor

Barbapapazes commented Jun 5, 2024

Hello 👋,

When using the hubBlob().serve(), https://github.com/nuxt-hub/core/blob/main/src/runtime/server/utils/blob.ts#L313, you could add the etag to the response headers to avoid the client browser to fetch a known image.

see this example https://developers.cloudflare.com/r2/api/workers/workers-api-usage/#4-access-your-r2-bucket-from-your-worker and this docs https://developers.cloudflare.com/r2/api/workers/workers-api-reference/#r2object-definition

@atinux atinux added the enhancement New feature or request label Jun 5, 2024
@atinux
Copy link
Contributor

atinux commented Jun 5, 2024

I like the idea, happy to open a PR for it @Barbapapazes ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants