I am trying to add custom cors headers in my cloud function because I'm not able to access it with other domains. But im not able to add them with
res.setHeader('Access-Control-Allow-Origin', '*');
res.setHeader('Access-Control-Allow-Methods', 'GET, POST');
res.setHeader('Access-Control-Allow-Headers', 'Content-Type, Authorization');
you would pass it as part of send or json. See https://github.com/open-runtimes/open-runtimes/blob/a3f20033b642d75096bc9754301e6d1525cebd1e/runtimes/node-18.0/src/server.js#L71-L90
Recommended threads
- My website is not loading for foreigners
I use my own domain, but I think it is set up correctly. My code is written in HTML+CSS+JS. Please help me๐๐
- Dokploy
Hey, I'm new here. I'm selfhosting via Dokploy, no issues regarding databases but however sites and functions don't work as SSL certificates can't generate. Can...
- bulk actions
Are bulk actions restricted from web sdk? I can't seem to be able to use `upsertRows` method for **tablesDB**