Pavan
CDCloudflare Developers
•Created by PneuTueur on 8/9/2024 in #workers-help
Access D1 database outside a request
Do you use Hono with cloudflare workers, right?
Do u can help with that:
https://discord.com/channels/595317990191398933/1276333679907704984/1276333679907704984
18 replies
CDCloudflare Developers
•Created by PneuTueur on 8/9/2024 in #workers-help
Access D1 database outside a request
You can create a middleware that you set a d1 clousure instance and use it without passing context.d1 to your functions that need dababase:
ex:
the middleware before all req could be like that:
to use
18 replies
CDCloudflare Developers
•Created by Pavan on 8/23/2024 in #workers-help
Cors blocking using Hono.js and workers
This way it works when calling from
localhost:3000
, but not from cloudflare pages (https://develop.scheduling-next-front-end.pages.dev)3 replies
CDCloudflare Developers
•Created by Pavan on 8/23/2024 in #workers-help
Cors blocking using Hono.js and workers
I think that the blocking is happening before it reaches my application. Because when I remove the origin from http://localhost:3000 and try to access from localhost:3000 I have see the OPTIONS logs in the WORKER panel, but when I try to access from "https://develop.scheduling-next-front-end.pages.dev" I havent see the OPTIONS logs in the worker panel.
Is there any CORS blocking in Cloud Flare before it reaches my application?
3 replies