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..)
image.png
image.png
Was this page helpful?