Skip to content

Commit 793ada9

Browse files
committed
fix: headers access
1 parent 6487fc9 commit 793ada9

File tree

2 files changed

+3
-1112
lines changed

2 files changed

+3
-1112
lines changed

apps/api/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import {
2121
startRequestSpan,
2222
} from "./lib/tracing";
2323
import { assistant } from "./routes/assistant";
24-
// import { customSQL } from './routes/custom-sql';
2524
import { exportRoute } from "./routes/export";
2625
import { health } from "./routes/health";
2726
import { publicApi } from "./routes/public";
@@ -112,10 +111,11 @@ const app = new Elysia()
112111
"/rpc/*",
113112
async ({ request, store }) => {
114113
try {
115-
// Run RPC handler within the active trace context if available
114+
const headers = new Headers(request.headers);
115+
116116
const handler = async () => {
117117
const rpcContext = await createRPCContext({
118-
headers: request.headers,
118+
headers,
119119
});
120120
const { response } = await rpcHandler.handle(request, {
121121
prefix: "/rpc",

0 commit comments

Comments
 (0)