Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using @directus/sdk in a Cloudflare Worker #19784

Closed
martinsotirov opened this issue Sep 25, 2023 · 5 comments
Closed

Using @directus/sdk in a Cloudflare Worker #19784

martinsotirov opened this issue Sep 25, 2023 · 5 comments

Comments

@martinsotirov
Copy link

martinsotirov commented Sep 25, 2023

Describe the Bug

The @directus/sdk seems to rely on the credentials field when sending requests via the Fetch API which causes the request to error out in a Cloudflare Worker context (See cloudflare/workers-sdk#2514).

To Reproduce

Try to use the @directus/sdk in a Cloudflare Worker

Directus Version

10.2.1

Hosting Strategy

Self-Hosted (Docker Image)

@br41nslug
Copy link
Member

This has been addressed in #19749

@martinsotirov
Copy link
Author

@br41nslug thanks for the info. Maybe this should be mentioned somewhere in the docs for the sdk. 👀

@br41nslug
Copy link
Member

Maybe this should be mentioned somewhere in the docs for the sdk. 👀

What specifically would you want to see in the docs?

@martinsotirov
Copy link
Author

@br41nslug I don't know, probably a short page dedicated to Edge deployments would be helpful. It could sum up all the different gotchas, like loading the SDK via esm.sh on Supabase Deno functions or this weird case with the credentials on Cloudflare Workers. I could make a docs PR if you point me in the right direction.

@br41nslug
Copy link
Member

It could sum up all the different gotchas

I cannot document what im not aware of "like loading the SDK via esm.sh on Supabase Deno functions" is news to me 🤔 and this cloudflare issue was a bug that has been resolved in the latest version.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants