Hi friends, new to workers for platforms
Hi friends, new to workers for platforms! What is the story on letting users manage secrets for their workers they upload? Like if my user wants to access their own database from their worker what is best practice for managing that? Thank you for the help!
3 Replies
Right now Im thinking in the UI where a user can upload their code, you would also have a section where they can add secrets, and I would use the cloudflare API to attach those secrets to the script?
It all depends on your use case, but adding secrets through API is a good way to add database info into the worker for the script to use.
You could also make use of the outbound worker and handle the db connection outside the user script for better security.
For secrets you would add them via the API like this:
@Beny thank you for replying! Just to clarify I was thinking about how a user accesses their own database, not my database 🙂