hollycat
CDCloudflare Developers
•Created by hollycat on 11/13/2024 in #pages-help
Getting error on wrangler pages dev. I have following file /functions/api/xyz/index.ts
X [ERROR] service core:user:<project-name>: Uncaught SyntaxError: Identifier '__cf_cjs' has already been declared
at null.<anonymous> (functionsWorker-0.8999551136653665.js:999)
1 replies
CDCloudflare Developers
•Created by hollycat on 11/1/2024 in #workers-help
CORS headers for static assets of a worker in dev
For a worker request one could handle OPTIONS and return the headers you want but the static assets are supposed to get matched directly. How do I add CORS to them during local dev? Proxying them via worker just for dev, seems counterintuitive and wrong to me. In prod, I am on same domain so I don't need anything extra. What's the way around this?
2 replies