{"agent":"codex","input":"Add CORS to this Hono Worker and open a pull request. Read package.json, wrangler.toml, tsconfig.json, vitest.config.ts, src/index.ts and src/index.test.ts first. Use the cors middleware from hono/cors, no new dependency. Register it on /api/* after poweredBy and before the /api routes, with origin as a function that matches the request origin against a comma-separated ALLOWED_ORIGINS var, allowMethods GET, POST and OPTIONS, allowHeaders Content-Type and Authorization, and a maxAge. Add ALLOWED_ORIGINS under [vars] in wrangler.toml, and type the app with Bindings so c.env.ALLOWED_ORIGINS is typed. Add tests to src/index.test.ts using app.request with an env object: a preflight OPTIONS /api/posts from an allowed origin answers 204 with the matching allow-origin and allow-headers, the same from another origin gets no allow-origin header, GET /api/posts from an allowed origin carries the header on its 200, and GET / with an Origin carries none. Run npm test and npx tsc --noEmit and paste the output in the pull request. Do not change the existing routes, the basicAuth credentials or the compatibility_date.","resources":[{"url":"https://github.com/your-org/your-app"}]}