diff --git a/examples/ai-agent/src/backend/server.ts b/examples/ai-agent/src/backend/server.ts index f20eefd70..56b5a5272 100644 --- a/examples/ai-agent/src/backend/server.ts +++ b/examples/ai-agent/src/backend/server.ts @@ -2,6 +2,7 @@ import { registry } from "./registry"; registry.start({ cors: { - origin: "http://localhost:5173", + origin: "http://localhost:3000", + credentials: true, }, }); diff --git a/examples/better-auth-external-db/src/backend/server.ts b/examples/better-auth-external-db/src/backend/server.ts index 637a609a7..aa2319d9b 100644 --- a/examples/better-auth-external-db/src/backend/server.ts +++ b/examples/better-auth-external-db/src/backend/server.ts @@ -6,7 +6,12 @@ import { auth } from "./auth"; import { registry } from "./registry"; // Start RivetKit -registry.start(); +registry.start({ + cors: { + origin: "http://localhost:5173", + credentials: true, + }, +}); // Setup router const app = new Hono(); diff --git a/examples/crdt/src/backend/server.ts b/examples/crdt/src/backend/server.ts index f20eefd70..56b5a5272 100644 --- a/examples/crdt/src/backend/server.ts +++ b/examples/crdt/src/backend/server.ts @@ -2,6 +2,7 @@ import { registry } from "./registry"; registry.start({ cors: { - origin: "http://localhost:5173", + origin: "http://localhost:3000", + credentials: true, }, }); diff --git a/examples/database/src/backend/server.ts b/examples/database/src/backend/server.ts index f20eefd70..56b5a5272 100644 --- a/examples/database/src/backend/server.ts +++ b/examples/database/src/backend/server.ts @@ -2,6 +2,7 @@ import { registry } from "./registry"; registry.start({ cors: { - origin: "http://localhost:5173", + origin: "http://localhost:3000", + credentials: true, }, }); diff --git a/examples/game/src/backend/server.ts b/examples/game/src/backend/server.ts index f20eefd70..56b5a5272 100644 --- a/examples/game/src/backend/server.ts +++ b/examples/game/src/backend/server.ts @@ -2,6 +2,7 @@ import { registry } from "./registry"; registry.start({ cors: { - origin: "http://localhost:5173", + origin: "http://localhost:3000", + credentials: true, }, }); diff --git a/examples/hono-bun/src/backend/server.ts b/examples/hono-bun/src/backend/server.ts index 77cc48b7e..b2d846ba4 100644 --- a/examples/hono-bun/src/backend/server.ts +++ b/examples/hono-bun/src/backend/server.ts @@ -13,6 +13,7 @@ const { client, fetch } = registry.start({ getUpgradeWebSocket: () => upgradeWebSocket, cors: { origin: "http://localhost:5173", + credentials: true, }, }); diff --git a/examples/hono-react/src/backend/server.ts b/examples/hono-react/src/backend/server.ts index 58006b776..4c5f80de1 100644 --- a/examples/hono-react/src/backend/server.ts +++ b/examples/hono-react/src/backend/server.ts @@ -5,6 +5,7 @@ import { registry } from "./registry"; const { client } = registry.start({ cors: { origin: "http://localhost:5173", + credentials: true, }, }); diff --git a/examples/rate/src/backend/server.ts b/examples/rate/src/backend/server.ts index f20eefd70..56b5a5272 100644 --- a/examples/rate/src/backend/server.ts +++ b/examples/rate/src/backend/server.ts @@ -2,6 +2,7 @@ import { registry } from "./registry"; registry.start({ cors: { - origin: "http://localhost:5173", + origin: "http://localhost:3000", + credentials: true, }, }); diff --git a/examples/raw-fetch-handler/src/backend/server.ts b/examples/raw-fetch-handler/src/backend/server.ts index a70c8e887..394945681 100644 --- a/examples/raw-fetch-handler/src/backend/server.ts +++ b/examples/raw-fetch-handler/src/backend/server.ts @@ -4,7 +4,12 @@ import { cors } from "hono/cors"; import { registry } from "./registry"; // Start RivetKit -const { client } = registry.start(); +const { client } = registry.start({ + cors: { + origin: "http://localhost:5173", + credentials: true, + }, +}); // Setup router const app = new Hono(); @@ -12,6 +17,7 @@ const app = new Hono(); app.use( cors({ origin: "http://localhost:5173", + credentials: true, }), ); diff --git a/examples/raw-websocket-handler-proxy/src/backend/server.ts b/examples/raw-websocket-handler-proxy/src/backend/server.ts index 9b386ce5c..a8eb71f97 100644 --- a/examples/raw-websocket-handler-proxy/src/backend/server.ts +++ b/examples/raw-websocket-handler-proxy/src/backend/server.ts @@ -3,7 +3,12 @@ import { createNodeWebSocket } from "@hono/node-ws"; import { Hono } from "hono"; import { registry } from "./registry.js"; -const { client } = registry.start(); +const { client } = registry.start({ + cors: { + origin: "http://localhost:5173", + credentials: true, + }, +}); const app = new Hono(); const { injectWebSocket, upgradeWebSocket } = createNodeWebSocket({ app }); diff --git a/examples/react/src/backend/server.ts b/examples/react/src/backend/server.ts index f20eefd70..b51ac47fe 100644 --- a/examples/react/src/backend/server.ts +++ b/examples/react/src/backend/server.ts @@ -3,5 +3,6 @@ import { registry } from "./registry"; registry.start({ cors: { origin: "http://localhost:5173", + credentials: true, }, }); diff --git a/examples/stream/src/backend/server.ts b/examples/stream/src/backend/server.ts index f20eefd70..56b5a5272 100644 --- a/examples/stream/src/backend/server.ts +++ b/examples/stream/src/backend/server.ts @@ -2,6 +2,7 @@ import { registry } from "./registry"; registry.start({ cors: { - origin: "http://localhost:5173", + origin: "http://localhost:3000", + credentials: true, }, }); diff --git a/examples/sync/src/backend/server.ts b/examples/sync/src/backend/server.ts index f20eefd70..56b5a5272 100644 --- a/examples/sync/src/backend/server.ts +++ b/examples/sync/src/backend/server.ts @@ -2,6 +2,7 @@ import { registry } from "./registry"; registry.start({ cors: { - origin: "http://localhost:5173", + origin: "http://localhost:3000", + credentials: true, }, }); diff --git a/examples/tenant/src/backend/server.ts b/examples/tenant/src/backend/server.ts index f20eefd70..56b5a5272 100644 --- a/examples/tenant/src/backend/server.ts +++ b/examples/tenant/src/backend/server.ts @@ -2,6 +2,7 @@ import { registry } from "./registry"; registry.start({ cors: { - origin: "http://localhost:5173", + origin: "http://localhost:3000", + credentials: true, }, });