-
Notifications
You must be signed in to change notification settings - Fork 0
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
Design Specs #1
Comments
We have to check how cloudflare workers work, because I am not sure if we can use environment variables to define the configurations if that is not possible probably we need to look for something different. Does it exist compile time configurations? I mean in order to define which paths are cached or which is the site that is going to be cached. |
Thanks for kick in @morenol! Environment VariablesIn relation to environment variables, on Cloudflare Workers you can specify variables via the wrangler.toml file. Refer to the documentation for more details. I'm not 100% sure if this environment variables are available in the WASM context as well, but I'm pretty sure we can access them straight from this file: https://github.com/rust-lang-ve/website-worker/blob/main/worker/worker.js Key/Value StorageIn order to consume Cloudflare's Key/Value storage, I think we can give a try on About Disabling CachePart of the main goal is to avoid hitting request limits, by providing this functionality:
We would introduce a vulnerability for our logic, I would be agnostic about this and rely on Cache directly for this instead of relying on the consumer for this. |
You are right, someone with bad intentions could hit our requests limits :(. But in any case we need to find a way to purge the data in the KV workers. Edit: That can be done with the wrangler CLI: https://developers.cloudflare.com/workers/cli-wrangler/commands#kvkey
That sounds fine, I already saw that you already added in scripts/make-wrangler.sh all the things needed to create that file with environment variables, so that's nice! |
I am opening this issue to discuss about the desing of this project.
The main goal is to create a cloudflare worker that can be used as "proxy" for other sites. It should cache the page using the native KV of Cloudflare, maybe we can use a header to disable the cache or add a configuration to cache only certain kind of requests (maybe using regex or something more simple than that).
The text was updated successfully, but these errors were encountered: