CORS headers overrided when using remote dev

I'm using sveltekit And there is CORS problem when i qurey from D1 database (In remote dev mode)(send form to server and query or insert and return success response) So I added hooks.server.ts to add headers (Access-Control-Allow- ..) but cloudflare overrides it.. how can i solve this problem? or any way move data from cloudflare d1 database to local database? ps. if i use 'wrangler dev --local' it works first image is local dev second image is remote dev with same code (sorry about second image.. i think that's critical for security..)
No description
No description
1 Reply
voltron
voltron8mo ago
I'm running into something similar with a simple http api. for whatever reason the origin is being rewritten to the wrangler dev server address
Want results from more Discord servers?
Add your server