diff --git a/apps/server/src/entities/entities.controller.ts b/apps/server/src/entities/entities.controller.ts index d2a540c..77ddda0 100644 --- a/apps/server/src/entities/entities.controller.ts +++ b/apps/server/src/entities/entities.controller.ts @@ -3,7 +3,7 @@ import {ApiBearerAuth, ApiOperation, ApiResponse, ApiTags} from '@nestjs/swagger import {EntitiesService} from './entities.service' import {Actor, Entity} from './entities.interface' -import {HEADER_GLOBAL_STORAGE_INSTANCE_ID, HEADER_GLOBAL_STORAGE_USER_ID} from 'remote-storage' +import {HEADER_REMOTE_STORAGE_INSTANCE_ID, HEADER_REMOTE_STORAGE_USER_ID} from 'remote-storage' const publicApiPrefix = '/entities/' @@ -45,11 +45,11 @@ export class EntitiesController { throw new BadRequestException('No headers provided') } - const instanceId = headers[HEADER_GLOBAL_STORAGE_INSTANCE_ID] + const instanceId = headers[HEADER_REMOTE_STORAGE_INSTANCE_ID] if (!instanceId) { throw new BadRequestException('No instanceId provided') } - const userId = headers[HEADER_GLOBAL_STORAGE_USER_ID] + const userId = headers[HEADER_REMOTE_STORAGE_USER_ID] if (!userId) { throw new BadRequestException('No userId provided') } diff --git a/apps/server/src/main.ts b/apps/server/src/main.ts index c54358f..c5ea54a 100644 --- a/apps/server/src/main.ts +++ b/apps/server/src/main.ts @@ -16,13 +16,13 @@ const CORS_OPTIONS = { 'Accept', 'Content-Type', 'Authorization', - HEADER_GLOBAL_STORAGE_USER_ID, - HEADER_GLOBAL_STORAGE_INSTANCE_ID, + HEADER_REMOTE_STORAGE_USER_ID, + HEADER_REMOTE_STORAGE_INSTANCE_ID, ], exposedHeaders: [ 'Authorization', - HEADER_GLOBAL_STORAGE_USER_ID, - HEADER_GLOBAL_STORAGE_INSTANCE_ID, + HEADER_REMOTE_STORAGE_USER_ID, + HEADER_REMOTE_STORAGE_INSTANCE_ID, ], credentials: true, methods: ['GET', 'PUT', 'OPTIONS', 'POST', 'DELETE'], diff --git a/packages/js-client/src/core/constants.ts b/packages/js-client/src/core/constants.ts index d3e2c56..d1ca09f 100644 --- a/packages/js-client/src/core/constants.ts +++ b/packages/js-client/src/core/constants.ts @@ -1,2 +1,2 @@ -export const HEADER_GLOBAL_STORAGE_INSTANCE_ID = 'x-remote-storage-instance-id' -export const HEADER_GLOBAL_STORAGE_USER_ID = 'x-remote-storage-user-id' +export const HEADER_REMOTE_STORAGE_INSTANCE_ID = 'x-remote-storage-instance-id' +export const HEADER_REMOTE_STORAGE_USER_ID = 'x-remote-storage-user-id' diff --git a/packages/js-client/src/core/remote-storage.ts b/packages/js-client/src/core/remote-storage.ts index 7730c54..be99849 100644 --- a/packages/js-client/src/core/remote-storage.ts +++ b/packages/js-client/src/core/remote-storage.ts @@ -36,8 +36,8 @@ export class RemoteStorage { method: method, headers: { 'Content-Type': 'application/json', - HEADER_GLOBAL_STORAGE_INSTANCE_ID: this.instanceId, - HEADER_GLOBAL_STORAGE_USER_ID: this.userId, + HEADER_REMOTE_STORAGE_INSTANCE_ID: this.instanceId, + HEADER_REMOTE_STORAGE_USER_ID: this.userId, }, body: JSON.stringify(data), })