How can I handle CORS using surrealDB's API on client-side? Here's my request:
method: 'POST', headers: { 'Accept': 'application/json', 'NS': 'test', 'DB': 'test' }, body: ('SELECT * FROM users)}
and this is the error when I send it to server: Access to fetch at 'http://localhost:8000/sql' from origin 'http://localhost:5173' has been blocked by CORS policy: Request header field ns is not allowed by Access-Control-Allow-Headers in preflight response.
I tried on Postman and ThunderClient (a VsCode extension) and it works, but in client-code I get that error. I also check the official docs and I did not found any solution.
Thank you very much.