Skip to content

Sync-in · Sovereign platform for file storage, sharing, synchronization, and collaboration.

refactor(backend:config): remove unused CORS origin configuration

johavene7d2badf040d
diff --git a/backend/src/infrastructure/websocket/adapters/web-socket.adapter.ts b/backend/src/infrastructure/websocket/adapters/web-socket.adapter.ts
index f14c26b6..2f23cf95 100644
--- a/backend/src/infrastructure/websocket/adapters/web-socket.adapter.ts
+++ b/backend/src/infrastructure/websocket/adapters/web-socket.adapter.ts
@@ -40,9 +40,6 @@ export class WebSocketAdapter extends IoAdapter {
createIOServer(port: number, options?: ServerOptions) {
const server = this.adapter.createIOServer(port, {
...options,
- cors: {
- origin: configuration.websocket.corsOrigin
- },
transports: ['websocket']
} satisfies ServerOptions)
// Authentication
diff --git a/backend/src/infrastructure/websocket/web-socket.config.ts b/backend/src/infrastructure/websocket/web-socket.config.ts
index 091b45b8..252b6c18 100644
--- a/backend/src/infrastructure/websocket/web-socket.config.ts
+++ b/backend/src/infrastructure/websocket/web-socket.config.ts
@@ -11,8 +11,4 @@ export class WebSocketConfig {
@IsNotEmpty()
// requires optional dependency: @socket.io/redis-adapter
redis: string = 'redis://127.0.0.1:6379'
-
- @IsString()
- @IsNotEmpty()
- corsOrigin: string = '*'
}
diff --git a/environment/environment.dist.yaml b/environment/environment.dist.yaml
index af42ed6c..0dbecd5c 100644
--- a/environment/environment.dist.yaml
+++ b/environment/environment.dist.yaml
@@ -47,9 +47,6 @@ websocket:
# adapter: `cluster` (Node.js Workers: default) | `redis`
# default: `cluster`
adapter: cluster
- # Cors origin allowed
- # default: `*`
- corsOrigin: '*'
# Redis adapter url
# default: `redis://127.0.0.1:6379`
redis: redis://127.0.0.1:6379