We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.1.23
Linux 6.10.7-xanmod1 x86_64 unknown
export default const app = new Elysia({ aot: false });
import { type Context } from "elysia"; import app from "./server"; export default { async fetch(request: Request, _env: Env, _ctx: Context): Promise<Response> { return await app.handle(request); }, };
workerd
wrangler dev index.ts
wrangler deploy index.ts
localhost:8787
headers
Notes:
1.1.15
new Elysia.use(app, { aot: false }).handle(request)
new Elysia.mount(app, { aot: false }).handle(request)
new Elysia.use(app, { aot: false }).fetch(request)
new Elysia.mount(app, { aot: false }).fetch(request)
ctx.headers should show the same headers as request.headers (in index.ts)
ctx.headers
request.headers
index.ts
Headers(8) { 'accept' => '*/*', 'accept-encoding' => 'br, gzip', 'content-length' => '2', 'content-type' => 'application/json', │ 'host' => 'localhost:8787', 'user-agent' => 'insomnia/9.0.0', 'x-signature-ed25519' => '9f19f67c8e316139774a7a7a823c86611ad182b5677f33384a7ccd788ed97fe9463fc9c0c3268cdc30d4493b43f393b42285c52aaa046b0dac48d06800fd9303', 'x-signature-timestamp' => '1729761548', [immutable]: true }
ctx.headers is undefined. Validation for headers also errors out
No response
node_modules
bun.lockb
Uhhh oopsies nope.
The text was updated successfully, but these errors were encountered:
this setup worked for me with no issues
// src/index.ts import { Elysia } from 'elysia' import { app } from './routes/app' export default { async fetch(request: Request, env: CloudflareBindings) { return await new Elysia({ aot: false }) .decorate("env", env) .use(app) .handle(request) }, }
// src/routes/app.ts import Elysia from "elysia"; export const app = new Elysia() .decorate("env", null as unknown as CloudflareBindings) .get("/", () => { return { hello: 'Elysia' } })
Sorry, something went wrong.
No branches or pull requests
What version of Elysia is running?
1.1.23
What platform is your computer?
Linux 6.10.7-xanmod1 x86_64 unknown
What steps can reproduce the bug?
export default const app = new Elysia({ aot: false });
workerd
locally:wrangler dev index.ts
(same results when using external endpoint afterwrangler deploy index.ts
)localhost:8787
, then accessheaders
in context.Notes:
1.1.15
)new Elysia.use(app, { aot: false }).handle(request)
new Elysia.mount(app, { aot: false }).handle(request)
new Elysia.use(app, { aot: false }).fetch(request)
new Elysia.mount(app, { aot: false }).fetch(request)
What is the expected behavior?
ctx.headers
should show the same headers asrequest.headers
(inindex.ts
)What do you see instead?
ctx.headers
is undefined. Validation forheaders
also errors outAdditional information
No response
Have you try removing the
node_modules
andbun.lockb
and try again yet?Uhhh oopsies nope.
The text was updated successfully, but these errors were encountered: