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

automated traffic proxying via cloudflare workers #8535

Open
Vadman97 opened this issue May 10, 2024 — with Linear · 2 comments
Open

automated traffic proxying via cloudflare workers #8535

Vadman97 opened this issue May 10, 2024 — with Linear · 2 comments
Assignees

Comments

Copy link
Member

use the cloudflare API to create a worker per customer

@Vadman97 Vadman97 self-assigned this May 10, 2024
Copy link

linear bot commented May 10, 2024

Copy link

greptile-apps bot commented May 10, 2024

To automate traffic proxying via Cloudflare Workers for each customer, follow these steps:

  1. Create a Base Worker Script: Use the /e2e/cloudflare-worker/src/index.ts as a template. This script proxies requests and can be customized per customer requirements.

  2. Dynamic Configuration: Adapt the script to accept customer-specific configurations, possibly via environment variables or an external configuration file.

  3. Deployment Automation: Utilize the wrangler CLI tool as specified in /e2e/cloudflare-worker/package.json scripts ("dev", "deploy", "typegen") to automate the deployment of these workers. Each worker can be deployed with a unique name or configuration, corresponding to a customer.

  4. API Integration for Worker Creation: Automate the creation and deployment of workers for new customers by integrating with the Cloudflare API, using the setup and deployment scripts as a basis for automation.

  5. Documentation and SDK Reference: Refer to /docs-content/getting-started/4_backend-sdk/js/cloudflare.md and /docs-content/sdk/cloudflare.md for additional details on configuring and utilizing the SDK within your Cloudflare Worker.

This approach allows for scalable and automated deployment of customer-specific proxying solutions using Cloudflare Workers.

References

/e2e/cloudflare-worker/src
/docs-content/getting-started/4_backend-sdk/js/cloudflare.md
/e2e/cloudflare-worker
/docs-content/sdk/cloudflare.md
/e2e/cloudflare-worker/package.json

Ask Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant