You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, I was playing around with writing a client for querying Cozo in the browser.
The problem is that the /text-query endpoint requires a JSON value to be passed, but I can't set the Content-Type header because the CorsLayer in your server doesn't allow for any headers to be set. I believe this will also disallow the x-cozo-auth header from being set on cross origin requests from the browser as well.
Adding the following line to the CorsLayer instantiation fixed the issue, and will allow for the auth header as well.
I haven't had the opportunity to look at this yet. If you're able to create a pull request, I would greatly appreciate it! Thank you in advance for your contribution.
Hey, I was playing around with writing a client for querying Cozo in the browser.
The problem is that the
/text-query
endpoint requires a JSON value to be passed, but I can't set the Content-Type header because theCorsLayer
in your server doesn't allow for any headers to be set. I believe this will also disallow thex-cozo-auth
header from being set on cross origin requests from the browser as well.Adding the following line to the
CorsLayer
instantiation fixed the issue, and will allow for the auth header as well.I can make a pull request if you like.
As an aside, thanks for doing Cozo! It looks great, I'm going to use it in lieu of SQLite in my file manager project and see how it goes.
The text was updated successfully, but these errors were encountered: