Closed Barbapapazes closed 3 months ago
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.
hubBlob().serve()
etag
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
I like the idea, happy to open a PR for it @Barbapapazes ?
Hello 👋,
When using the
hubBlob().serve()
, https://github.com/nuxt-hub/core/blob/main/src/runtime/server/utils/blob.ts#L313, you could add theetag
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