diff --git a/.env.example b/.env.example index f2faeeb..8dcbe61 100644 --- a/.env.example +++ b/.env.example @@ -4,6 +4,7 @@ PORT=4000 DATABASE_URL="mysql://root@localhost:3306/nq" REDIS_URL="redis://@127.0.0.1:6379/4" JWT_SECRET="secret" +CLIENT_URL="https://localhost:5173" # Game configuration ALLOW_DIAGONAL_MOVEMENT=false diff --git a/src/server.ts b/src/server.ts index 6a390a5..bee71d0 100644 --- a/src/server.ts +++ b/src/server.ts @@ -28,7 +28,7 @@ export class Server { constructor() { this.app = express() this.app.use(cors({ - origin: 'https://sylvan.quest' + origin: config.CLIENT_URL })) this.app.use(express.json()) this.app.use(express.urlencoded({ extended: true }))