diff --git a/packages/common/nbstore/src/impls/cloud/blob.ts b/packages/common/nbstore/src/impls/cloud/blob.ts index 671687d75ced1..6bccdfea2db62 100644 --- a/packages/common/nbstore/src/impls/cloud/blob.ts +++ b/packages/common/nbstore/src/impls/cloud/blob.ts @@ -16,7 +16,12 @@ export class CloudBlobStorage extends BlobStorage { override async get(key: string) { const res = await fetch( this.options.peer + '/api/workspaces/' + this.spaceId + '/blobs/' + key, - { cache: 'default' } + { + cache: 'default', + headers: { + 'x-affine-version': BUILD_CONFIG.appVersion, + }, + } ); if (!res.ok) { diff --git a/packages/frontend/core/src/modules/cloud/services/fetch.ts b/packages/frontend/core/src/modules/cloud/services/fetch.ts index b989e629adc2c..668b25c6e1ec9 100644 --- a/packages/frontend/core/src/modules/cloud/services/fetch.ts +++ b/packages/frontend/core/src/modules/cloud/services/fetch.ts @@ -54,6 +54,10 @@ export class FetchService extends Service { .fetch(new URL(input, this.serverService.server.serverMetadata.baseUrl), { ...init, signal: abortController.signal, + headers: { + ...init?.headers, + 'x-affine-version': BUILD_CONFIG.appVersion, + }, }) .catch(err => { logger.debug('network error', err);